CListBox.SetItemHeightmethod
Sets the height, in pixels, of items in a list box.
Syntax
FUNCTION SetItemHeight (BYVAL hListBox AS HWND, BYVAL nHeight AS DWORD) AS LONG
Parameters
| Name | Description | |
|---|---|---|
hListBox | The handle of the listbox control. | |
index | Specifies the zero-based index of the item in the list box. Use this parameter only if the list box has the LBS_OWNERDRAWVARIABLE style; otherwise, set it to zero. | |
nHeight | Specifies the height, in pixels, of the item. The maximum height is 255 pixels. |
Return value
If the index or height is invalid, the return value is LB_ERR.
Description
Sets the height, in pixels, of items in a list box. If the list box has the LBS_OWNERDRAWVARIABLE style, this message sets the height of the item specified by the wParam parameter. Otherwise, this message sets the height of all items in the list box.
Example
CListBox.SetItemHeight(hListBox, 30)
Reference
- Include file
CListBox.inc - Defined in AfxNova/CListBox.inc:502
- Documented in Windows/WIndows Controls/CListBox Class.md
- Topic: CListBox Class