Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

ItemLevel Property, SftTree Object

Defines an item's level number.

Deprecated - Provided for compatibility with earlier versions only - Use Item.Level instead

Syntax

Get

VB.NETLevel = object.get_ItemLevel(ByVal ItemIndex As Integer) As Short
VBLevel = object.ItemLevel(ByVal ItemIndex As Long) As Integer
C#.NETshort Level = object.get_ItemLevel(int ItemIndex);
VC++short Level = object->ItemLevel[long ItemIndex];
short Level = object->GetItemLevel(long ItemIndex);
CHRESULT object->get_ItemLevel(long ItemIndex, short* Level);

Put

VB.NETobject.set_ItemLevel(ByVal ItemIndex As Integer, ByVal Level As Short)
VBobject.ItemLevel(ByVal ItemIndex As Long) = Level As Integer
C#.NETvoid object.set_ItemLevel(int ItemIndex, short Level);
VC++short object->ItemLevel[long ItemIndex] = Level;
void object->PutItemLevel(long ItemIndex, short Level);
CHRESULT object->put_ItemLevel(long ItemIndex, short Level);

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


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.