SftTree/DLL 6.5

ItemLines

Softel vdm, Inc.

Defines the number of text lines used for item height calculation.

C

int WINAPI SftTree_GetItemLines(HWND hwndCtl);
BOOL WINAPI SftTree_SetItemLines(HWND hwndCtl, int nLines);
int WINAPI SftTreeSplit_GetItemLines(HWND hwndCtl);
BOOL WINAPI SftTreeSplit_SetItemLines(HWND hwndCtl, int nLines);

C++

int CSftTree::GetItemLines() const;
BOOL CSftTree::SetItemLines(int nLines);
int CSftTreeSplit::GetItemLines() const;
BOOL CSftTreeSplit::SetItemLines(int nLines);

Parameters

hwndCtl

The window handle of the tree control.

nLines

The number of text lines used to calculate the expected height of items.

Returns

GetItemLines returns the current number of text lines last defined using SetItemLines.

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

Comments

The GetItemLines and SetItemLines functions define the number of text lines used for item height calculation.

The height of items is determined based on an item's attributes such as registered item picture size, label picture size, fonts used, etc.  Using SetItemLines, an application can specify how many lines of cell text an item can display in a cell.

In a fixed height tree control (see SFTTREESTYLE_VARIABLE) all cell text has the same number of text lines.  If an application needs multiple text lines to support word wrapping (see SFTTREE_COLUMN_EX, SFTTREE_WRAP) or new line characters in cell text, SetItemLines must be used to specify the number of text lines.

In a variable height tree control, each item's height is determined individually.  If an application allows word wrapping (see SFTTREE_COLUMN_EX, SFTTREE_WRAP) or new line characters in cell text, SetItemLines must be used to specify the maximum number of text lines to display in all cells.  If cell text exceeds the specified number of lines, "+" is shown at the bottom, right corner of the cell.

A tree control defaults to one line of text for each item. 

See Also  C/C++ API  |  CategoriesNotifications

 


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