TREEVIEW control styles

Styles

%TVS_HASBUTTONS

Displays (+) and (-) buttons next to ""parent"" items in the tree.

%TVS_HASLINES

Displays lines for improved visualization of the hierarchy of items.

%TVS_LINESATROOT

Displays lines to link items at tree root, if the control has %TVS_HASLINES style.

%TVS_EDITLABELS

Labels are editable in the TreeView.

%TVS_DISABLEDRAGDROP

TreeView drag/drop mode is disabled.

%TVS_SHOWSELALWAYS

Selected TreeView item remains in selected state when focus is lost.

%TVS_RTLREADING

TreeView text is displayed from right-to-left (RTL), if supported by the Windows shell language.

%TVS_NOTOOLTIPS

Automatic tooltips are disabled in the TreeView.

%TVS_CHECKBOXES

Items in TreeView have check boxes, provided an image is set for the item.

%TVS_TRACKSELECT

TreeView has hot-tracking enabled.

%TVS_SINGLEEXPAND

Enables only one TreeView item to be expanded at any time, closing one branch as another is opened. The %TVS_LINESATROOT style cannot be combined with the %TVS_SINGLEEXPAND style.

%TVS_INFOTIP

TreeView requests tooltip information from the parent window (%TVN_GETINFOTIP).

%TVS_FULLROWSELECT

TreeView permits full-row selection by clicking anywhere in the row. (Except for %TVS_HASLINES style)

%TVS_NOSCROLL

Disables both horizontal and vertical scrolling, and no scrollbars are displayed.

%TVS_NONEVENHEIGHT

Allows odd item heights within the control. (%TVM_SETITEMHEIGHT).

%TVS_NOHSCROLL

Horizontal TreeView scrolling is disabled

%WS_BORDER

Add a thin line border around the text box control.

%WS_DISABLED

Create a control that is initially disabled. A disabled control cannot receive input from the user.

%WS_GROUP

Define the start of a group of controls. The first control in each group should also use %WS_TABSTOP style. The next %WS_GROUP control in the tab order defines the end of this group and the start of a new group. Groups configured this way permit the arrow keys to shift focus between the controls within the group, and focus can jump from group to groups with the usual TAB and SHIFT+TAB keys. Both tab stops and groups are permitted to wrap from the end of the tab order back to the start.

%WS_TABSTOP

Allow the list box control to receive keyboard focus when the user presses the TAB and SHIFT+TAB keys. The TAB key shifts keyboard focus to the next control with the %WS_TABSTOP style, and SHIFT+TAB shifts focus to the previous control with %WS_TABSTOP. (default)

 

Extended Styles

%WS_EX_CLIENTEDGE

Apply a sunken edge border to the control.

%WS_EX_LEFT

The control has generic "left-aligned" properties. (default)

%WS_EX_RIGHT

The control has generic "right-aligned" properties. This style has an effect only if the shell language is Hebrew, Arabic, or another language that supports reading order alignment.

%WS_EX_STATICEDGE

Apply a three-dimensional border style to the control (intended to be used for items that do not accept user input).

%WS_EX_TRANSPARENT

Controls/windows beneath the dialog are drawn before the dialog is drawn. The dialog is deemed transparent because elements behind the dialog have already been painted - the dialog itself is not drawn differently. True transparency is achieved by using Regions - see MSDN and/or the Platform SDK documentation for more information.

%WS_EX_WINDOWEDGE

Apply a raised edge border to the control.

%WS_EX_LTRREADING

Window text displayed in Left to Right reading-order.

%WS_EX_RTLREADING

Window text displayed in Right to Left reading-order, depending on the shell language.

%WS_EX_RIGHTSCROLLBAR

The vertical scrollbar is positioned to the right of the client area.

%WS_EX_LEFTSCROLLBAR

The vertical scrollbar is positioned to the left of the client area.

 

See Also

Styles reference

CONTROL ADD TREEVIEW

TREEVIEW statement