FMX Teegrid set/get top/left most visible column and row

TeeGrid VCL / FMX for Embarcadero RAD Studio, Delphi, C++ Builder and Lazarus Free Pascal.
Post Reply
Newbie
Newbie
Posts: 1
Joined: Tue Oct 15, 2024 12:00 am

FMX Teegrid set/get top/left most visible column and row

Post by » Fri Oct 25, 2024 4:45 am

What is the best way to get and set the left most column currently shown (when the grid is scrolled sideways) ?
Similarly, how do I set the top most row currently shown (when the grid is scrolled down) ?

As an example I tried the following code to get the LH column shown but it always returned zero.

Code: Select all

function LHColumn:integer;
var myColumn : TColumn;
begin
    MyColumn:=TeeGrid1.Columns.FirstVisible;
    result:=myColumn.ID;
end;
I am able to GET the top row via this code, but cannot find anywhere in the sample code or docs on how to manually scroll to a given column and row

Code: Select all

    iTopRow:=TeeGrid1.Rows.FirstVisible(0);
Thanks
Brian

Post Reply