I can easily double click my string grid and get the contents of a cell using a VCL application. How can I do this using FMX?

  

I use this code to be able to click on a certain cell in my grid and be able to output the string in that cell. It works perfectly fine in my VCL application.

procedure TForm1.StringGridBindSourceDB1CellDblClick(const Column: TColumn;
const Row: Integer);

var
Coordinates:TGridCoord;
x:integer;
Pt:TPoint;
html_body:string;
ClickCol:Integer;
ClickRow:Integer;
begin
Pt := grid.ScreenToClient(mouse.CursorPos);
Coordinates := grid.MouseCoord(Pt.X, Pt.Y);

ClickCol := Coordinates.X;
ClickRow := Coordinates.Y;
html_body := grid.Cells[ClickCol, ClickRow];
end;

However when I try to achieve the same result in a firemonkey application I am not able to use “TGridCood,” “ScreenToClient,” or “mouse.CursorPos”

“grid” is a TStringGrid

Comments are closed.