Hi,
This is my code on StringGrid OnMouseUp event:
procedure TForm1.StringGrid1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
ACol, ARow: integer;
begin
with (Sender as TStringGrid) do begin
MouseToCell(X, Y, ACol, ARow);
if (ACol = 1) and (ARow>=FixedRows) then begin
ShowMessage('Click');
end;
end;
end;
If I click on the non grid area the event still fired as long as the mouse pointer inline with column 1 (see picture).
How can I prevent this? so the event fired only when the mouse pointer clicked on top of the grid cell area.