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
Items are being sorted.
VB.NET | Private Sub object_SortCompare(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.SortCompare |
VB | Private Sub object_SortCompare(ByVal StringVal1 As String, ByVal StringVal2 As String, ByVal ItemData1 As Long, ByVal ItemData2 As Long, RetVal As Integer) |
C#.NET | void object_SortCompare(object sender, EventArgumentType e); |
VC++ | void OnSortCompareobject(_bstr_t StringVal1, _bstr_t StringVal2, long ItemData1, long ItemData2, short* RetVal); |
C | HRESULT OnSortCompareobject(BSTR StringVal1, BSTR StringVal2, long ItemData1, long ItemData2, short* RetVal); |
object
StringVal1
The cell text of the item to be compared to the cell text StringVal2 of the second item.
StringVal2
The cell text of the item to be compared to the cell text StringVal1 of the first item.
ItemData1
The value of the item to be compared to the value ItemData2 of the second item. Depending on the SortType argument of the Items.SortDependents method, the ItemData1 parameter contains the following value:
SortType | Description |
---|---|
sortSftTreeEvent | ItemData1 contains the Item.Data property value of the item being sorted. |
sortSftTreeEventCell | ItemData1 contains the Cell.Data property value of the item being sorted. |
sortSftTreeEventWithIndex | ItemData1 contains the index of the item being sorted. An application can retrieve property values from the item if necessary for comparison purposes. |
ItemData2
The value of the item to be compared to the value ItemData1 of the first item. Depending on the SortType argument of the Items.SortDependents method, the ItemData2 parameter contains the following value:
SortType | Description |
---|---|
sortSftTreeEvent | ItemData2 contains the Item.Data property value of the item being sorted. |
sortSftTreeEventCell | ItemData2 contains the Cell.Data property value of the item being sorted. |
sortSftTreeEventWithIndex | ItemData2 contains the index of the item being sorted. An application can retrieve property values from the item if necessary for comparison purposes. |
RetVal
Returns the collating sequence. Return a value greater than zero to indicate that StringVal1 is greater than StringVal2 (or ItemData1 > ItemData2), equal to 0 to indicate that the values are equal, a value less than zero to indicate StringVal1 is less than StringVal2 (or ItemData1 < ItemData2).
The SortCompare event occurs when items are being sorted.
The SortCompare event is generated to compare two items. The return value set in RetVal determines the collating sequence of the items being compared. The SortCompare event is only generated when the Items.SortDependents method is used with a SortType of sortSftTreeEvent, sortSftTreeEventCell and sortSftTreeEventWithIndex. The immediate dependents are sorted in a fashion determined by the SortCompare event.
See Also SftTree Object | Object Hierarchy