Unit 'MUIClass.List' Package
[Overview][Types][Classes][Index] [#MUIClass]

TMUIList.OnCompare

Event to compare two entries for sorting

Declaration

Source position: MUIClass.List.pas line 128

published property TMUIList.OnCompare : TCompareEvent
  read FOnCompare
  write SetOnCompare;

Description

If you plan to have the entries of your list sorted (either by inserting them sorted or by using the Sort() method) and if the entries of your list are not simple strings, you must supply a compare hook.

The Event should return something like:
Result Value Entry relation
< 0 Entry1 < Entry2
= 0 Entry1 = Entry2
> 0 Entry1 > Entry2

Documentation generated on: 2024-12-22