TeeGrid, android

TeeGrid VCL / FMX for Embarcadero RAD Studio, Delphi, C++ Builder and Lazarus Free Pascal.
Post Reply
TheOtherPrefontaine
Newbie
Newbie
Posts: 28
Joined: Tue Aug 22, 2023 12:00 am

TeeGrid, android

Post by TheOtherPrefontaine » Sun Aug 03, 2025 6:17 pm

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?

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

Re: TeeGrid, android

Post by Yeray » Tue Aug 19, 2025 6:51 am

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;
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