[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'ComCtrls' (#lcl)

TCustomListView.ColClick

Performs actions to handle a mouse click on a Report view column header.

Declaration

Source position: comctrls.pp line 1522

protected procedure TCustomListView.ColClick(

  AColumn: TListColumn

); virtual;

Arguments

AColumn

  

List view column clicked in the header for the control.

Description

ColClick is a method used to handle a mouse click on a column header when the list view control is in Report view (ViewStyle = vsReport).

ColClick ensures that the Editor for the control is hidden when it has been assigned and displayed for the control.

AColumn is the TListColumn instance representing the column header clicked on the control. The OnColumnClick event handler is signalled (when assigned) if ColumnClick is set to True. The event handler can be used to adjust property values in the column argument or the list view control as needed.

ColClick uses the value in AutoSort to determine if the control is updated to reflect a change to the sort column or its order indicator. No additional actions are performed when AutoSort is False or SortType is stNone.

When AutoSort is set to True, the Index in AColumn is used to set the value for the SortColumn property. When AutoSortIndicator is enabled, the Columns for the control are updated to clear any previous sort indicators when a new sort column has been clicked. The sort indicator in the AColumn argument is also updated. If AColumn was already the SortColumn for the control, the value in SortDirection is toggled between it ascending and descending values.

ColClick is called when the LVN_COLUMNCLICK control notification message is handled for the list view control.


Version 3.2 Generated 2024-02-25 Home