Tree views / Usage |
After the program array has been filled, you must execute a DISPLAY ARRAY instruction. This can be a singular DISPLAY ARRAY or a DISPLAY ARRAY sub-dialog within a DIALOG instruction.
CALL fell_tree(tree_arr) DISPLAY ARRAY tree_arr TO sr.* ATTRIBUTES(UNBUFFERED) BEFORE ROW DISPLAY "Current row is: ", DIALOG.getCurrentRow("sr") END DISPLAY
It is not possible to use the DISPLAY ARRAY paged mode (ON FILL BUFFER) when the decoration is a tree view list. The dialog needs the complete set of open nodes with parent/child relation to handle the tree view display, with the paged mode only a given window of the dataset is known by the dialog. If you use a the paged mode in DISPLAY ARRAY with a tree view as decoration, the program will raise an error at runtime.
However, tree-views can be filled dynamically with ON EXPAND / ON COLLAPSE triggers.