Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

MakeIntegralHeight

Resizes the tree control vertically so visible items are displayed in their entirety.

C

void WINAPI SftTree_MakeIntegralHeight(HWND hwndCtl, int maxHeight);
void WINAPI SftTreeSplit_MakeIntegralHeight(HWND hwndCtl, int maxHeight);

C++

void CSftTree::MakeIntegralHeight(int maxHeight = 0);
void CSftTreeSplit::MakeIntegralHeight(int maxHeight = 0);

Parameters

hwndCtl

The window handle of the tree control.

maxHeight

The maximum allowable height of the tree control in pixels. The tree control is resized vertically to display as many items as possible in their entirety without exceeding maxHeight. If 0 is used, the current tree control height is used as maximum height.

Comments

The MakeIntegralHeight function resizes the tree control vertically so visible items are displayed in their entirety.

MakeIntegralHeight is used to resize the tree control so it doesn't display partial items. The maxHeight value specifies the maximum height of the tree control to use. MakeIntegralHeight calculates the largest height of the tree control (smaller or equal to maxHeight) so that no partial items are displayed and resizes the control vertically using the calculated height. MakeIntegralHeight takes all tree control attributes into consideration, including the presence of a horizontal scroll bar.

MakeIntegralHeight should be used after all tree control attributes have been set and all items have been added. If tree control attributes are changed after using MakeIntegralHeight, the tree control does not automatically resize if items become partially visible.

MakeIntegralHeight has no effect if variable height items are used.

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