Page 1 of 1

TeeGrid, android

Posted: Sun Aug 03, 2025 6:17 pm
by 18696547
I would like to be able to tap to select a row.

I see TeeGridTap(Sender: TObject; const Point: TPointF)

Is there a way to turn that TPointF into a row number?

Re: TeeGrid, android

Posted: Tue Aug 19, 2025 6:51 am
by yeray
Hello,

At the TStringGrid demo, the OnSelect event is used as follows to get the row and other info from the clicked/tapped cell:

Code: Select all

// Called when selecting a cell, by mouse click, touch, or arrow keys
procedure TStringGridForm.TeeGrid1Select(Sender: TObject);
var tmp : TGridSelection;
begin
  tmp:=TeeGrid1.Grid.Current.Selected;

  if tmp.IsEmpty then
     Label1.Text:=''
  else
     Label1.Text:='Selected cell: '+HeaderText(tmp.Column)+
                     ' Row: '+IntToStr(tmp.Row)+
                     ' Value: '+TeeGrid1.Grid.Current.Data.AsString(tmp.Column,tmp.Row);
end;