TcxShellCompareEvent Type
The procedural type for shell item comparison events.
Declaration
TcxShellCompareEvent = procedure(Sender: TObject; AItem1: TcxShellFolder; AItem2: TcxShellFolder; var ACompare: Integer) of object;
Parameters
| Name | Type | Description |
|---|---|---|
| Sender | TObject | Provides access to the shell control that raised the shell item comparison event. Cast the |
| AItem1 | TcxShellFolder | The first compared shell item. |
| AItem2 | TcxShellFolder | The second compared shell item. |
| ACompare | Integer | Specifies how the shell item comparison event handler evaluates the |
Remarks
The shell comparison event occurs every time a DevExpress Shell List View control is about to compare two shell items during a sort operation. Handle this event to customize the shell item order after a sort operation. The following table explains the values you should assign to the ACompare parameter to achieve a specific item order:
| Value | Description |
|---|---|
| A negative integer value. | AItem1 is positioned before AItem2. |
| 0 | Both items are treated as equal; their positions do not change. |
| A positive integer value. | AItem1 is positioned after AItem2. |
The following public API members reference the TcxShellCompareEvent procedural type:
- TcxCustomShellListView.OnCompare
- Occurs when two items are compared when sorting the shell list view.
- TdxCustomShellListView.OnCompare
- Allows you to implement a custom shell item sorting algorithm.