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
Defines an item's level number.
Deprecated - Provided for compatibility with earlier versions only - Use Item.Level instead
Get
VB.NET | Level = object.get_ItemLevel(ByVal ItemIndex As Integer) As Short |
VB | Level = object.ItemLevel(ByVal ItemIndex As Long) As Integer |
C#.NET | short Level = object.get_ItemLevel(int ItemIndex); |
VC++ | short Level = object->ItemLevel[long ItemIndex]; short Level = object->GetItemLevel(long ItemIndex); |
C | HRESULT object->get_ItemLevel(long ItemIndex, short* Level); |
Put
VB.NET | object.set_ItemLevel(ByVal ItemIndex As Integer, ByVal Level As Short) |
VB | object.ItemLevel(ByVal ItemIndex As Long) = Level As Integer |
C#.NET | void object.set_ItemLevel(int ItemIndex, short Level); |
VC++ | short object->ItemLevel[long ItemIndex] = Level; void object->PutItemLevel(long ItemIndex, short Level); |
C | HRESULT object->put_ItemLevel(long ItemIndex, short Level); |
object
ItemIndex
The zero-based index of the item to be accessed.
Level
Defines the item's level number. The valid range is 0 through 63.
Deprecated - Provided for compatibility with earlier versions only - Use Item.Level instead
The ItemLevel property defines an item's level number.
The ItemLevel property determines the "indentation" of an item. By changing an item's level number, its parent relation is automatically adjusted by the tree control. Using this method, the application does not have to manipulate any parent/child relationships, but can instead treat the entire list of items in a tree control as a linear list, an array of items.
The root (or highest) level is level 0, dependents are on levels 1, 2, 3 and lower. The valid range of levels is 0 through 63.
When changing an item's level using the ItemLevel property, its (current and new) parent items will automatically be expanded to make the item visible.
While logically the first item in the tree control should be at level 0, this is not necessary. Also, a parent item does not necessarily require an immediate dependent (on the next lower level); its first dependent could be on a much lower level. While this is very application specific, SftTree/OCX does allow you to build hierarchies of items where parent/child relationships don't have to follow strict rules.
See Also SftTree Object | Object Hierarchy