TVM_SETITEMSPACING (Windows CE 5.0)
This message sets the vertical spacing between items in a tree view.
TVM_SETITEMSPACINGwParam = 0;lParam = (LPARAM)(int)iSpacing;
Parameters
- iSpacing
New vertical spacing, in pixels, between items in the tree view. The default value is 0.
Return Values
This message always returns the previous item spacing.
Remarks
The layout of items in a tree view is determined by the items' total heights. Each item has an inherent height, which is the greater of the icon height or the text height. The total height of an item is the sum of the item's inherent height and the item spacing. As a result, changing the item spacing does not affect an item's inherent height, but it does affect the total height.
Changing the item spacing has the apparent effect of increasing the distance between items. At rendering, half of the item spacing is above the item; the other half is below.
Actions that depend on the height of an item, such as rendering the focus highlight, are based on the total height of an item.
Requirements
OS Versions: Windows CE .NET 4.2 and later.
Header: Commctrl.h.
See Also
Send Feedback on this topic to the authors