Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now