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
Solved

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

Posted on 1998-09-18
1
175 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
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Internet Explorer View Settings Question 15 116
can't find the executable in Simulator 1 100
control image tags in a string ? 12 142
Unique identifier on a terminal server (rdp) 4 67
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

828 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