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

TCustomListView.OnCompare

Event handler signalled to compare list items in the CustomSort method.

Declaration

Source position: comctrls.pp line 1578

protected property TCustomListView.OnCompare : TLVCompareEvent
  read FOnCompare
  write FOnCompare;

Description

OnCompare is a TLVCompareEvent property with the event handler signalled to compare the values for list items. Arguments passed to the event handler identify the list view control, the items compared in the handler. The relative sort order for the compared items is returned in a variable parameter passed to the handler.

OnCompare is signalled (when assigned) when the Sort method is called, or when CustomSort is called without specifying a custom sort function.

See also

TCustomListView.Sort

  

Sorts the values in Items when SortType is not stNone and SortColumn is valid.

TCustomListView.CustomSort

  

Sorts the Items for the list view control using the specified procedure or the OnCompare event handler.

TLVCompareEvent

  

TLVCompareEvent - generic event handler method for List View comparison.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.