Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

ItemHeight

Returns an item's height (in pixels).

C

int WINAPI SftTree_GetItemHeight(HWND hwndCtl);
int WINAPI SftTree_GetItemHeightVar(HWND hwndCtl, int index);
int WINAPI SftTreeSplit_GetItemHeight(HWND hwndCtl);
int WINAPI SftTreeSplit_GetItemHeightVar(HWND hwndCtl, int index);

C++

int CSftTree::GetItemHeight() const;
int CSftTreeSplit::GetItemHeight(int index) const

Parameters

hwndCtl

The window handle of the tree control.

index

The zero-based index of an item in a variable height tree control for which the item height is to be retrieved. This parameter can not be used in a fixed height tree control.

Returns

The return value is the current height (in pixels) of all items in a fixed height tree control or the height of a specified item in a variable height tree control. -1 is returned if an error occurred.

Comments

The GetItemHeight function returns an item's height (in pixels).

In a fixed height tree control, all items in a tree control have the same height. The best height for items is automatically calculated based on the pictures and other attributes used. If multi-line text entries are desired, SetItemLines should be used to set the expected (maximum) number of lines per item. This insures that multiple lines of text will fit within the vertical space allocated to each item.

The SetItemHeightMinMax function can be used to define an item's minimum and maximum height (in pixels).

See Also C/C++ API | Categories | Notifications