XTR.EXPANDLEVEL

This field allows you to control the expanded/collapsed state of the items when the tree is created or re-entered. Set the field to a value between 0 and 9, indicating the maximum level to expand (0=all items collapsed so that only the level 0 items are visible, 9=all items expanded). You may optionally specify one of the two flags listed below:

Symbol

Value

Description

XTEXPF_SAVE

&h40

Save current expand/collapse status on exit

XTEXPF_RESTORE

&h80

Restore saved status (on XTROP_REPLACE reentry)

 

Notes

XTEXPF_SAVE can be used with any of the level values (0-9) in XTR.EXPANDLEVEL to start out with the specified uniform level of expansion but save the user-modified status on exit. But XTEXPF_RESTORE overrides all other options (unless there was no previously saved status, in which case XTEXPF_RESTORE is ignored).

XTEXPF_RESTORE assumes that the order of the rows has not changed since the previous exit from that tree. Since the expand/collapse status is associated only with the row numbers as displayed, changing the sort order on reentry would result in the wrong items being expanded or collapsed.