Developer

IgnoreEditing

When called inside events such as OnKeyDown or OnMouseDown editing will not start even if cell is editable.

procedure IgnoreEditing;

Example:


procedure TForm1.NextGrid61MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var CellAtPos: TPoint; CellRect, ButtonRect: TRect; begin CellAtPos := NextGrid61.ActiveView.GetCellAtPos(Point(X, Y)); CellRect := NextGrid61.ActiveView.GetCellRect(CellAtPos); // ButtonRect is part of Cell's TRect ButtonRect := CellRect; ButtonRect.Width := ButtonRect.Height; // Don't start editing if click is inside button TRect if PtInRect(ButtonRect, Point(X, Y)) then begin NextGrid61.IgnoreEditing; end; end;

See also