Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

Indentation

Defines the indentation (in pixels) for item levels.

C

int WINAPI SftTree_GetIndentation(HWND hwndCtl);
BOOL WINAPI SftTree_SetIndentation(HWND hwndCtl, int pixels);
int WINAPI SftTreeSplit_GetIndentation(HWND hwndCtl);
BOOL WINAPI SftTreeSplit_SetIndentation(HWND hwndCtl, int pixels);

C++

int CSftTree::GetIndentation() const;
int CSftTree::SetIndentation(int pixels);
int CSftTreeSplit::GetIndentation() const;
int CSftTreeSplit::SetIndentation(int pixels);

Parameters

hwndCtl

The window handle of the tree control.

pixels

The indentation (in pixels) for item levels. Valid values are greater or equal to 0. Set to -1 to allow the tree control to determine the best indentation, based on item picture width, font size, etc.

Returns

GetIndentation returns the current indentation (in pixels) for each level.

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

Comments

The GetIndentation and SetIndentation functions define the indentation (in pixels) for item levels.

Each item is indented the specified number of pixels for each level. The GetItemLevel and SetItemLevel functions define an item's level number.

It is possible to specify a very small value or even 0 for the level indentation. With such a small value, the hierarchy and its components, such as tree lines, expand/collapse buttons may no longer have sufficient space and must be turned off by the application.

The SetItemPictureAlign function can be used to define the alignment of connecting tree lines, cell text and cell pictures.

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