Common Properties

TITLE

Tree view controls do not have titles.

VALUE

The ID of the currently selected item. When you set the VALUE, the corresponding item is selected (or the selection is removed if there is no corresponding item). When you retrieve the VALUE, the result is the ID of the current selection, or NULL if nothing is selected.

SIZE

SIZE and LINES describe the area occupied by the tree view control, using the control's font to determine the dimensions of a row and column. Additional space is added for the scroll bar (which is hidden when it is not needed). The default height of a tree view is 5 lines; the default width is 12 columns. For character-based systems, the size and appearance of the tree view control depends on the configuration variables TREE-TAB-SIZE and TREE-ROOT-SPACE.

COLOR

Tree views use any specified foreground or background color. If either color is omitted, that color uses a system-dependent default value. Under Microsoft Windows, the default values are determined by the user's choices in the Control Panel (usually black on bright white). These system-dependent default colors are not transformed or mapped by the runtime system's color-handling configuration options.

ITEM-COLOR

Tree views can now have a different color for each item. Use the ITEM-COLOR property (which accepts a numeric value representing a color) to specify this when adding items to the tree view. For example:
MODIFY tree-ctl
ITEM-TO-ADD "Tree Item" ITEM-COLOR 397
GIVING item-ptr

ATW-CSS-CLASS

This property enables you to apply CSS styles to the control when the program is run through AcuToWeb. The value of ATW-CSS-CLASS should represent a corresponding class in the current theme (that is, a .class-name entry in the cascading style sheet) deployed when you run your program through AcuToWeb. This property can be applied to more than one control in your program.

If both the ATW-CSS-CLASS and ATW-CSS-ID properties are specified for this control, and both correspond to the same style in the style sheet, the style specified by ATW-CSS-ID takes precedence.

See Cascading Style Sheet Syntax for more information about additional in-built styles in AcuToWeb.

ATW-CSS-ID

This property enables you to apply CSS styles to the control when the program is run through AcuToWeb. The value of ATW-CSS-ID should represent a corresponding ID in the current theme (that is, a #class-name entry in the cascading style sheet) deployed when you run your program through AcuToWeb. The value of this property must be unique, and only applied to one control in your program.

If both the ATW-CSS-CLASS and ATW-CSS-ID properties are specified for this control, and both correspond to the same style in the style sheet, the style specified by ATW-CSS-ID takes precedence.

See Cascading Style Sheet Syntax for more information about additional in-built styles in AcuToWeb.

SELECTION-COLOR

Tree view controls can specify the selection color. Use the SELECTION-COLOR property (which accepts a numeric value representing a color) to specify this. You can specify the selection color either at creation or with the MODIFY verb.

EVENT-LIST, EXCLUDE-EVENT-LIST

EVENT-LIST is an exclusive list of events that are either sent to or withheld (blocked) from the program depending on the value of EXCLUDE-EVENT-LIST. See Common Screen Options for more information.

STYLES

3-D Adds 3-D decoration around the border of the control. Effective only on boxed tree views.
BOXED Indicates that a box should be placed around a tree view. This is the default
BUTTONS Places small buttons to the left of each item, which the user can click to expand or collapse the item in addition to double-clicking the item. The buttons show a + if the item can be expanded, or a - if it can be collapsed. Items with no subsidiary items do not get a button. Also, buttons are placed on the top level items only if you also specify the SHOW-LINES and LINES-AT-ROOT styles.
Note: Some versions of Windows are known to have a bug that prevents the buttons from displaying correctly if you do not also specify the SHOW-LINES style.
LINES-AT-ROOT Allows the SHOW-LINES and BUTTONS styles to apply to top-level items. Note that the runtime configuration variable TREE_ROOT_SPACE can control the number of screen columns between the left edge of the tree-view control and the root level text.
NO-BOX This style removes the box that normally displays around the control
SHOW-LINES This style causes faint lines to be drawn between the items to help clarify their nesting relationship. Lines are not drawn between top-level items unless you also specify the LINES-AT-ROOT style.
SHOW-SEL-ALWAYS The control always shows the current selection, even when it does not have the focus. The default is to hide the selection when the control does not have the focus.