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
- identifier defines the name of the element.
- attribute is an attribute for the element.
- title is the text to be displayed as column title.
- name_column is a mandatory column referencing a form item defining the node text.
- identifier references a form item.
Attributes
COMMENT
, DOUBLECLICK
,
HIDDEN
,
FONTPITCH
,
STYLE
,
TAG
, UNHIDABLECOLUMNS
,
UNMOVABLECOLUMNS
, UNSIZABLECOLUMNS
,
UNSORTABLECOLUMNS
, WANTFIXEDPAGESIZE
,
WIDTH
,
HEIGHT
,
PARENTIDCOLUMN
, IDCOLUMN
, EXPANDEDCOLUMN
,
ISNODECOLUMN
, IMAGEEXPANDED
,
IMAGECOLLAPSED
, IMAGELEAF
.
Usage
To create a tree view in a grid-based layout, you must define the following elements in the form file:
- The layout of the tree-view, with a
TREE
container in theLAYOUT
section. - The column data types and field properties, in the
ATTRIBUTES
section. - 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