TCustomGrid.HeaderClick procedure
Performs actions needed when a mouse click occurs in a fixed header for a grid column or row.
Declaration
procedure HeaderClick(IsColumn: Boolean; index: Integer); virtualArguments
IsColumn | True if the click occurred on a column header. False for a row header. |
index | Column (or row) number for the header click. |
Description
HeaderClick ensures that the value in
SortOrder is
toggled when
Index contains the
SortColumn defined for
the grid control. SortOrder is set to
soAscending when Index
contains a column number other than SortColumn. SortColumn is updated in the
method to use the value in Index as the active sort column.
HeaderClick calls the Sort method to sort all non-fixed rows in
the grid control using the content from the column number in Index.
No actions are performed in the method when ColumnClickSorts is
set to False.
IsColumn indicates whether the header click applies to a column or
a row. When set to
True, the mouse click occurred in a fixed header
for the column number in Index. This parameter implies that similar handling
is provided in the method for a header click on a fixed header in a row. No
actions are performed for a header click on a row.
HeaderClick is overridden in descendent classes like
TCustomDrawGrid to perform additional actions.
HeaderClick is called from methods like DialogChar and MouseUp.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
