Scrolling to a certain grid line

TeeGrid VCL / FMX for Embarcadero RAD Studio, Delphi, C++ Builder and Lazarus Free Pascal.
Post Reply
thomasc
Newbie
Newbie
Posts: 1
Joined: Mon Mar 27, 2017 12:00 am

Scrolling to a certain grid line

Post by thomasc » Thu Jun 15, 2017 12:11 pm

We did not find any option to focus (scroll to) a certain grid line. For instance if only 20 lines of the grid are shown but you want to set the focus in line 99 this line should move to the top of the grid or to one of the first visible lines.
There should be a command to set the focus in this line automatically.

Yeray
Site Admin
Site Admin
Posts: 8733
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Scrolling to a certain grid line

Post by Yeray » Mon Jun 19, 2017 8:02 am

Hello,

You can do this:

Code: Select all

type
  TRowGroupAccess=class(TRowGroup);

//...

  TRowGroupAccess(TeeGrid1.Grid.Current).Scroll(0,TeeGrid1.Rows.UpToRowHeight(99));
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply