HeaderPane
Main
Hide
Share Link
Print

ItemLines

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

C

int WINAPI SftBox_GetItemLines(HWND hwndCtl);
BOOL WINAPI SftBox_SetItemLines(HWND hwndCtl, int nLines);

C++

int CSftBox::GetItemLines() const;
BOOL CSftBox::SetItemLines(int nLines);

Parameters

hwndCtl

The window handle of the combo box control.

nLines

The number of text lines used to calculate the expected height of items. This value must be 1 or greater.

Returns

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

SetItemLines returns TRUE if the function was successful, otherwise FALSE is returned. FALSE is returned if nLines is less than 1.

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. The number of text lines applies to the items in the dropdown portion and to the selected item shown in the static portion.

In a fixed height combo box, all cell text has the same number of text lines. If an application needs multiple text lines to support word wrapping (see SFTBOX_COLUMN, SFTBOX_WRAP) or new line characters in cell text (SFTBOX_MULTILINE), SetItemLines must be used to specify the number of text lines.

In a variable height combo box (see SFTBOXSTYLE_VARIABLE), each item's height is determined individually. If an application allows word wrapping (see SFTBOX_COLUMN, SFTBOX_WRAP) or new line characters in cell text (SFTBOX_MULTILINE), SetItemLines must be used to specify the maximum number of text lines to display in all cells.

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

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


Last Updated 11/21/2026 - (email)
© 2026 Softel vdm, Inc.