An item's sort setting.

Usage

Set_Property(OLECtrlEntID, "OLE.ItemSort[key]", OptionValue)

Values

OptionValue can be set to one of the following valid options:

ValueAbbr.Description
NoneNThe item's children are not sorted
AscendingAThe item's children are sorted in ascending order
DescendingDThe item's children are sorting in descending order

Default: None

Indices

IndexDescription
keyAn item's unique key

Remarks

The ItemSort property sets the item's persistent sort setting. Set this property to "None" if you don't want an item automatically sorted. Set it to "Ascending" if you want the item's children to be sorted automatically in ascending order or "Descending" if you want the item's children to be sorted automatically in descending order.

 

Setting this property to "Ascending" or "Descending" causes to the item's children to always be sorted, even when new items are later added or removed. If you only want to perform a one-time sort, then use the Sort method instead.

The sorting relies upon the child items' ItemType property settings.

Use the DefSort property to set the default sorting of new items.

Example

// Sort Item1 in descending order 
Set_Property(@Window:".OLE_TREE", "OLE.ItemSort[Item1]", "Descending") 

// Sort all items in ascending order 
Set_Property(@Window:".OLE_TREE", "OLE.ItemSort[All]", "Ascending")

See Also

ItemDefSortItemTypeSort

  • No labels