Vcl.ComCtrls.TLVCompareEvent

From RAD Studio API Documentation
Jump to: navigation, search

C++

typedef void __fastcall (__closure *TLVCompareEvent)(System::TObject* Sender, TListItem* Item1, TListItem* Item2, int Data, int &Compare);

Properties

Type Visibility Source Unit Parent
typedef public Vcl.ComCtrls.hpp Vcl.ComCtrls Vcl.ComCtrls

Description

TLVCompareEvent is a procedure called by the OnCompare event.

The TLVCompareEvent event handler compares the list items passed as the Item1 and Item2 parameters. If Item1 is the same as Item2 in the sort order, set the Compare parameter to 0. If Item1 is less than Item2, set the Compare parameter to a value less than 0. If Item1 is greater than Item2, set the Compare parameter to a value greater than 0.

The Data parameter is 0 when the event handler is called to maintain the sort order of a list view with a SortType of stData or stBoth. Similarly, when OnCompare occurs in response to the AlphaSort method, the Data parameter is 0. When OnCompare occurs in response to the CustomSort method, the Data parameter is the value of the LParam parameter of CustomSort.

See Also