SftTree/DLL 6.5

ItemLevel

Softel vdm, Inc.

Defines an item's level number.

C

int WINAPI SftTree_GetItemLevel(HWND hwndCtl, int index);
BOOL WINAPI SftTree_SetItemLevel(HWND hwndCtl, int index, int level);
int WINAPI SftTreeSplit_GetItemLevel(HWND hwndCtl, int index);
BOOL WINAPI SftTreeSplit_SetItemLevel(HWND hwndCtl, int index, int level);

C++

int CSftTree::GetItemLevel(int index) const;
BOOL CSftTree::SetItemLevel(int index, int level);
int CSftTreeSplit::GetItemLevel(int index) const;
BOOL CSftTreeSplit::SetItemLevel(int index, int level);

Parameters

hwndCtl

The window handle of the tree control.

index

The zero-based index of the item for which the level number is to be retrieved or set.

level

The new, zero-based level number of the item.

Returns

GetItemLevel returns the level number of the requested item or -1 if an error occurred.

SetItemLevel returns TRUE if the function was successful, otherwise FALSE is returned.

Comments

The GetItemLevel and SetItemLevel functions define an item's level number.

If an item is not visible when its level is set, it is automatically made visible by expanding its parent(s).  If an item is collapsed when its level is set, it is first automatically expanded.

The root (or highest) level is level 0, dependents are on levels 1, 2, 3 and lower.  The lowest level is defined as level SFTTREE_MAXLEVELS (64).

The SetIndentation function can be used to define the exact indentation for item levels.

In a tree control using a virtual data source, SetItemLevel cannot be used and an error is returned.  The level member of the SFTTREE_ITEM structure is used instead. 

See Also  C/C++ API  |  CategoriesNotifications

 


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