Creating the user interface / Containers |
The Tree container defines the presentation of a list of ordered records in a tree-view widget.
Figure 1. Tree Container
name, tag, style, posX, posY, gridHeight, gridWidth, hidden, fontPitch, comment, localizedStr, wantFixedPageSize, unSortableColumns, unSizableColumns, unMovableColumns, unHidableColumns, doubleClick, totalRows, rowHeight, parentIdColumn, idColumn, expandedColumn, isNodeColumn, imageCollapsed, imageLeaf
A Tree is made of rows and columns, very similar to a Table container, with the exception that the rows in a tree can be nested.
The Tree container is created by default with two Edit columns, and two Phantom columns that do not display on the screen. The Phantom columns of the Tree specify the id and the parent id of each row, enabling nesting. The other columns display data rows in a normal format without nesting, as in a table.Properties of the tree container specify the idColumn and parentIdColumn. Additional properties specify images to be used for the expand/contract icons and leaf icons.
The rows in the tree are automatically defined in your form as a screen array. In your BDL program, define a corresponding dynamic array that matches the screen array, using the screen record in the Form to determine column names and their order. Your program must populate the rows of the container at runtime.See the topic on Tree Views in the Genero Business Development Language User Guide for more details about tree-view programming in Genero.