|
|
|
SftTree.ItemLevel Property |
Defines an item's level number.
Deprecated - Provided for compatibility with earlier versions only - Use Item.Level instead
Syntax
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];
|
||
C |
HRESULT object->get_ItemLevel(long ItemIndex, short* Level); |
||
Delphi |
Level := object.ItemLevel[ItemIndex : Integer] : Smallint; |
||
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;
|
||
C |
HRESULT object->put_ItemLevel(long ItemIndex, short Level); |
||
Delphi |
object.ItemLevel[ItemIndex : Integer] := Level : Smallint; |
object
A SftTree 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.
Comments
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