TREE container

The TREE container defines the presentation of a list of ordered records in a tree-view widget.

Syntax

TREE [identifier] [ ( attribute [,...] ) ]
{
 title [...]
 [name_column   [|identifier   [|...]] ]
[...]
}  
END
  1. identifier defines the name of the element.
  2. attribute is an attribute for the element.
  3. title is the text to be displayed as column title.
  4. name_column is a mandatory column referencing a form item defining the node text.
  5. identifier references a form item.

Form attributes

COMMENT, DOUBLECLICK, HIDDEN, FONTPITCH, STYLE, TAG, UNHIDABLECOLUMNS, UNMOVABLECOLUMNS, UNSIZABLECOLUMNS, UNSORTABLECOLUMNS, WANTFIXEDPAGESIZE, WIDTH, HEIGHT, PARENTIDCOLUMN, IDCOLUMN, EXPANDEDCOLUMN, ISNODECOLUMN, IMAGEEXPANDED, IMAGECOLLAPSED, IMAGELEAF.

Style attributes

Common: backgroundColor, border, fontFamily, fontSize, fontStyle, fontWeight, localAccelerators, showAcceleratorInToolTip, textColor, textDecoration.

Class-specific: allowWebSelection, forceDefaultSettings, headerAlignment, headerHidden, highlightColor, highlightCurrentRow, highlightTextColor, resizeFillsEmptySpace, rightFrozenColumns, rowActionTrigger, showGrid, tableType.

Usage

To create a tree view in a grid-based layout, you must define the following elements in the form file:

  1. The layout of the tree-view, with a TREE container in the LAYOUT section.
  2. The column data types and field properties, in the ATTRIBUTES section.
  3. The field list definition to group form fields together with a screen array, in the INSTRUCTIONS section.

For more details about this item type, see TREE item type.

Example

LAYOUT 
GRID
{
<Tree t1                       >
 Name                   Index 
[c1                     |c2    ]
[c1                     |c2    ]
[c1                     |c2    ]
[c1                     |c2    ]
}
END 
END

ATTRIBUTES
LABEL c1 = FORMONLY.name;
LABEL c2 = FORMONLY.idx;
PHANTOM FORMONLY.pid;
PHANTOM FORMONLY.id;
TREE t1: tree1
    PARENTIDCOLUMN = pid,
    IDCOLUMN = id;
END

INSTRUCTIONS
SCREEN RECORD sr_tree(name, pid, id, idx);
END