TCustomGrid.AllowOutboundEvents property
Allows a mouse click on unused space in the control, and moves the cursor to the nearest valid cell.
Declaration
property AllowOutboundEvents: Boolean read FAllowOutboundEvents write FAllowOutboundEvents default True;Description
Normally, when a user clicks on a point over the empty space after cells (for example if grid has three rows but user clicks on imaginary fourth row) the current focused cell will move to the nearest cell to the point clicked on the grid. We call this an outbound event.
AllowOutboundEvent affects actions performed when columns are resized, and when the Row or Col number is changed for the grid control, and the grid zone reported for a mouse click on a fixed grid cell. The value is temporarily reset and restored during execution of the MouseDown, MouseMove, and IsMouseOverCellButton methods.
The default value for the property is True, as this has been the grid's behavior since the beginning. It allows OnClick events to be signalled for the corresponding actions and options enabled for the grid.
This was added to mimic Delphi behavior where outbound events are not available; to enable Delphi compatibility, set AllowOutboundEvents to False.
Published in TDrawGrid and TStringGrid descendants in LCL version 5.0.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
