Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

ItemHeightMinMax

Defines an item's minimum and maximum height (in pixels).

C

void WINAPI SftTree_GetItemHeightMinMax(HWND hwndCtl, int index,
      int* pMin, int* pMax);
BOOL WINAPI SftTree_SetItemHeightMinMax(HWND hwndCtl, int index,
      int minHeight, int maxHeight);
void WINAPI SftTreeSplit_GetItemHeightMinMax(HWND hwndCtl, int index,
      int* pMin, int* pMax);
BOOL WINAPI SftTreeSplit_SetItemHeightMinMax(HWND hwndCtl, int index,
      int minHeight, int maxHeight);

C++

void CSftTree::GetItemHeightMinMax(int index, int* pMin, int* pMax) const;
BOOL CSftTree::SetItemHeightMinMax(int index, int minHeight, int maxHeight);
void CSftTreeSplit::GetItemHeightMinMax(int index, int* pMin, int* pMax) const;
BOOL CSftTreeSplit::SetItemHeightMinMax(int index, int minHeight, int maxHeight);

Parameters

hwndCtl

The window handle of the tree control.

index

In a fixed height tree control, index must be -1 and defines the minimum and maximum height for all items.

In a variable height tree control, index defines the zero-based index of the item for which the minimum and maximum height is to be set.

pMin

Returns the currently defined minimum height. If no minimum height has been defined, 0 is returned.

pMax

Returns the currently defined maximum height. If no maximum height has been defined, 0 is returned.

minHeight

Defines the item's minimum height. Specify 0 to allow the control to determine the optimal height.

maxHeight

Defines the item's maximum height. Specify 0 to allow the control to determine the optimal height.

Returns

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

Comments

The GetItemHeightMinMax and SetItemHeightMinMax functions define an item's minimum and maximum height (in pixels).

Normally, SftTree/DLL determines the best item height for all items by analyzing their attributes. It may be desirable to override this height for certain items or all items. The SetItemHeightMinMax can be used to force a defined minimum and maximum height. Minimum and maximum can be set to the same value, in which case the defined item(s) will have the specified height.

In a variable height tree control using a virtual data source, SetItemHeightMinMax cannot be used. The minHeight and maxHeight members of the SFTTREE_ITEM structure are used instead.

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