SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Two items are compared for sorting purposes.
VB.NET | Private Sub object_SortCompare(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.SortCompare |
VB | Private Sub object_SortCompare(ByVal Text1 As String, ByVal Text2 As String, ByVal vData1 As Variant, ByVal vData2 As Variant, ByVal Value1 As Long, ByVal Value2 As Long, RetVal As Integer) |
C#.NET | void object_SortCompare(object sender, EventArgumentType e); |
VC++ | void OnSortCompareobject(_bstr_t Text1, _bstr_t Text2, const _variant_t& vData1, const _variant_t& vData2, long Value1, long Value2, short* RetVal); |
C | HRESULT OnSortCompareobject(BSTR Text1, BSTR Text2, VARIANT vData1, VARIANT vData2, long Value1, long Value2, short* RetVal); |
object
Text1
The cell text of the item to be compared to the cell text Text2 of the second item.
Text2
The cell text of the item to be compared to the cell text Text1 of the first item.
vData1
The first item's Item.DataTag Variant data or the first cell's Cell.DataTag Variant data, depending on the Items.Sort method's SortType parameter.
vData2
The second item's Item.DataTag Variant data or the second cell's Cell.DataTag Variant data, depending on the Items.Sort method's SortType parameter.
Value1
The first cell's Cell.Data data.
Value2
The second cell's Cell.Data data.
RetVal
Used to return the collating sequence to the caller. Return a value greater than zero to indicate that the first item is considered greater than the second item, equal to 0 to indicate that the values are equal, a value less than zero to indicate that the first item is considered less than the second item.
The SortCompare event occurs when two items are compared for sorting purposes.
Depending on the Items.Sort method's SortType parameter, the SortCompare event is called to compare items as they are being sorted. The SortCompare event is called many times during one call to the Items.Sort method.
As two items are compared, the RetVal return value must be set to provide the result of the comparison.
The combo box should not be updated in any way while handling this event.
See Also SftBox Object | Object Hierarchy