Frequently Asked Component Specific Questions
Options |
|
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>

TMS FMX UI PackTTMSFMXGrid: How to access the current TRectF of a grid specific cell
You can retrieve the grid cell rectangle with XYToCell:
procedure TForm1.TMSFMXGrid1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Single);
var
cl: TCell;
obj: TControl;
cellr: TRectF;
begin
cl := TMSFMXGrid1.XYToCell(X, Y);
obj := TMSFMXGrid1.GetCellObject(TMSFMXGrid1.GetDisplayCell(cl));
if Assigned(obj) then
cellr := RectF(obj.Position.X, obj.Position.Y, obj.Position.X + obj.Width, obj.Position.Y + obj.Height);
end;