Works in conjunction with PARENT to determine where new items are located in the hierarchy. The PLACEMENT value affects the location within a given sublevel (that is, the list of items that have the same parent). If PLACEMENT is set to a valid item ID (whose parent is PARENT), the new item is placed immediately after this item. Alternatively, you can use any one of the following special values (defined in acugui.def):
| TVPLACE-FIRST | Item placed first in the list |
| TVPLACE-LAST | Item placed last in the list |
| TVPLACE-SORT | Item sorted alphabetically in the list |
The default setting is TVPLACE-LAST.
In the following example, items are sorted alphabetically except at the top level:
77 ID-1 USAGE POINTER.
77 ID-2 USAGE POINTER.
MODIFY TREE-VIEW-1, ITEM-TO-ADD = "Ordinals", GIVING ID-1
PARENT = ID-1, PLACEMENT = TVPLACE-SORT,
ITEM-TO-ADD = ( "First", "Second", "Third", "Fourth" )
PARENT = 0, PLACEMENT = TVPLACE-LAST,
ITEM-TO-ADD = "Cardinals", GIVING ID-2,
PARENT = ID-2, PLACEMENT = TVPLACE-SORT,
ITEM-TO-ADD = ( "One", "Two", "Three", "Four" ).
The resulting tree looks like this: