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

# TCustomListView.OnColumnClick

Event handler signalled when a column header for the control is clicked.

## Declaration

Source position: comctrls.pp line 1603

`protected property TCustomListView.OnColumnClick : TLVColumnClickEvent read FOnColumnClick write FOnColumnClick;`

## Description

OnColumnClick is a TLVColumnClickEvent property with the event handler signalled when a column header for the list view control has been clicked. OnColumnClick is signalled (when assigned) from the ColClick method when ColumnClick has been enabled for the control.

Arguments passed to the event handler identify the list view control and the TListColumn instance clicked in the control. It is signalled before values in SortType, SortColumn, and SortDirection are checked or updated. It is commonly used to enabled or disable AutoSort or AutoSortIndicator when a specific column is clicked.

## See also

TCustomListView.ColumnClick |  | Enables or disables OnColumnClick events for column headers on the control.
TCustomListView.ColClick |  | Performs actions to handle a mouse click on a Report view column header.
TCustomListView.AutoSort |  | Controls automatic updates to the sort column and order indicator for the control.
TCustomListView.AutoSortIndicator |  | Indicates if the control automatically changes the column and/or order indicator when a column is clicked.
TCustomListView.SortType |  | Specifies the sorting mechanism used for the current SortColumn.
TCustomListView.SortColumn |  | Ordinal position for the column used to sort the list items, or -1 when not assigned.
TCustomListView.SortDirection |  | Sorting direction (order) for the current SortColumn.
TCustomListView.Columns |  | Collection with the column definitions for the list view control (size, alignment, image index, etc.).
TListItem |  | Represents the items created in TCustomListView and descendants.
TLVColumnClickEvent |  | Specifies an event handler signalled for a mouse click on a list view column.