Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

Window Styles

The following window styles are available in addition to the standard window styles (such as WS_BORDER, WS_TABSTOP, etc.):

SFTTREESTYLE_DISABLENOSCROLL (0x0001L)

When this style is selected, the scroll bars are disabled when scrolling is not possible. Without this style, scroll bars are hidden when scrolling is not possible. This style should not be changed after the tree control is created. Use SetDisableNoScroll instead.

SFTTREESTYLE_DRAGDROP (0x0010L)

When this style is selected, the tree control allows the user to drag & drop items within and outside the tree control. It is up to the control's parent to handle the notification messages to process a drag & drop operation and to set appropriate mouse cursors. This style can be changed using SetWindowLong(hwnd, GWL_STYLE, style), as long as no drag & drop operation is in progress.

SFTTREESTYLE_LEFTBUTTONONLY (0x0020L)

When this style is selected, the tree control will ignore the middle and right mouse buttons. No notifications will be sent to the parent window when the middle or right mouse buttons are clicked.

SFTTREESTYLE_MULTIPLESEL (0x0008L)

When this style is selected, the tree control will allow multiple items to be selected at the same time. One or more items can be selected using the mouse. Using the Control key causes additional items to be selected without removing previous selections. Using the Shift key causes ranges of items to be selected, starting at the last position. Without this style, only one item can be selected at a time and the Control and Shift keys have no effect. This style can be changed using SetWindowLong(hwnd, GWL_STYLE, style), however all selections have to be cleared first.

SFTTREESTYLE_NOTIFY (0x0004L)

When this style is selected, the tree control will send WM_COMMAND messages to the parent window for event notification. This style can be changed using SetWindowLong(hwnd, GWL_STYLE, style).

SFTTREESTYLE_SCROLL (0x0040L)

When this style is selected, the window styles WS_HSCROLL and WS_VSCROLL given when the tree control is created, determine if scroll bars are present. If this style is not selected, scroll bars are automatically added to the tree control when needed. E.g., to prevent a vertical scroll bar from being added to the tree control, define the SFTTREESTYLE_SCROLL style and do not add the WS_VSCROLL style.

SFTTREESTYLE_VARIABLE (0x0080L)

Defines a variable height tree control, where the height of each item varies based on the fonts, bitmaps, pictures, lines of text, word wrapping and other attributes used. In a variable height tree control each item can have a different height based on its attributes. If this style is not specified, all items have the same height.

SFTTREESTYLE_WANTKEYBOARDINPUT (0x0002L)

When this style is selected, the tree control will send WM_VKEYTOITEM messages to the parent window for keyboard input processing. Without this style, the parent window will not receive WM_VKEYTOITEM messages from the tree control. This style can be changed using SetWindowLong(hwnd, GWL_STYLE, style). This notification is only sent for keystrokes received by the tree control through the WM_KEYDOWN message and is provided for compatibility with the standard Windows list box. Applications should handle the WM_CHAR or WM_KEYDOWN messages instead to enhance or expand the tree control response to keyboard input. This can be accomplished by subclassing the control (C) or by deriving a C++ class from the provided tree control classes (CSftTree or CSftTreeSplit).

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