Page 1 of 1

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

Posted: Fri Oct 25, 2024 4:45 am
by 18698894
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