Solved

Which method do I need to use to scroll a Grid control up or down?

Posted on 1998-09-18
1
177 Views
Last Modified: 2010-04-06
Hi!!! I need to scroll in my program the grid control, 1 row up or 1 row down.. how can I do that?

Thanks in advance
Jaime
0
Comment
Question by:skel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
erajoj earned 50 total points
ID: 1340206
Hi,
If you're using TStringGrid (or decendant):

procedure TForm1.Button3Click(Sender: TObject); // scroll up
begin
  with StringGrid1 do if TopRow < RowCount - VisibleRowCount then TopRow := TopRow  + 1;
end;

procedure TForm1.Button4Click(Sender: TObject); // scroll down
begin
  with StringGrid1 do if TopRow > FixedRows then TopRow := TopRow  - 1;
end;

/// John
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi Firemonkey Need Sample for Online Shopping Example. 2 218
Delphi 2 91
Way to create an iPhone app for my customers 8 91
QuickReport, Delphi, Shape 12 48
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question