SftTree/OCX 7.0

SftTreeItem.Level Property

Softel vdm, Inc.

Defines the item's level number.

Syntax       

Get

VB.NET

Lvl = object.Level  As Short

VB

Lvl = object.Level  As Integer

C#.NET

short Lvl = object.Level;

VC++

short Lvl = object->Level;
short Lvl = object->GetLevel();

C

HRESULT object->get_Level(short* Lvl);

Delphi

Lvl := object.Level   : Smallint;

Put

VB.NET

object.Level = Lvl  As Short

VB

object.Level = Lvl  As Integer

C#.NET

short object.Level = Lvl;

VC++

short object->Level = Lvl;
void object->PutLevel(short Lvl);

C

HRESULT object->put_Level(short Lvl);

Delphi

object.Level := Lvl   : Smallint;

object

A SftTreeItem object.

Lvl

Defines the item's level number.  The valid range is 0 through 63.

Comments

The Level property defines the item's level number.

The Level 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 Level property, its (current and new) parent items will automatically be expanded to make the item visible.

The indentation of item levels can be defined using the Items.Indentation property.

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  SftTreeItem Object | Object Hierarchy


Feedback / comments / error reports for this topic
© 2015 - Softel vdm, Inc. - www.softelvdm.com