|
procedure TStosWin.MyDrawGrid1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var R, C: Integer; begin with MyDrawGrid1 do begin MouseToCell(X, Y, C, R); if (C = OldHintCol) and (R = OldHintRow) then exit; {Don't do anything if mouse is in the same cell} OldHintCol := C; OldHintRow := R; Hint := ' Your hint for column C and row R'; {Force the hint to redisplay} PostMessage(Handle, WM_MBUTTONDOWN, MK_LBUTTON, Dword((Y shl 16) + X)); end; end;
|