Updated May 2017
This parameter is used to enable exit keys and other options according to the tables below. Note that although most of the flags are optional niceties, a few are critical to proper XTREE operation. In particular, XTF_XYXY is required, and XTF_COLDFX is nearly always appropriate. The parameter can be mapped in one of three ways:
MAP1 FLAGS,B,4 ! (XTF_xxx)
or
MAP1 XFLAGS
MAP2 FLAGS,B,4 ! (XTF_xxx)
MAP2 FLAGS2,B,4 ! (XTF2_xxx)
or
MAP1 XFLAGS, ST_XFLAGS ! (defined in ashinc:xtree.sdf)
The second or third form is required if you want to use any of the XTF2_xxxx flags (i.e. XTREE Flags2), but in that case, note that you must specify XFLAGS (i.e. the structure) rather than either flags or flags2 in the parameter list.
To set individual flags, just add (or combine using the "OR" operator) the corresponding symbols or values, for example:
FLAGS = XTF_XYXY or XTF_COLDFX
or
XFLAGS.FLAGS2 = XFLAGS.FLAGS2 or XTF2_DRAGDROP2
flags2 and the XTF2 symbols have their own section here: XTREE Flags2. Also see XTR.MISCFLAGS for additional flags and more information.
The symbol definitions come from ashinc:xtree.def.
Symbol |
Value |
Description |
XTF_FKEY |
&h00000001 |
Allow F1-F16 (returning Exitcodes -1 through –16) |
XTF_LEFT |
&h00000002 |
Enable Left arrow (Exitcode -40) |
XTF_RIGHT |
&h00000004 |
Enable Right arrow (Exitcode –41) |
XTF_UP |
&h00000008 |
Enable Ctrl+Up arrow on first row (Exitcode -42). See "Locating and Selecting Items ... Use the Up/Down-arrow keys " in Mouse and Keyboard. |
XTF_TAB |
&h00000020 |
Enable Tab key (Exitcode -44), and Shift+Tab (Exitcode -35) |
XTF_HOME |
&h00000040 |
Enable Home key (Exitcode –45) |
XTF_END |
&h00000080 |
EnableEnd key (Exitcode –46) |
&h00000100 |
Controls Escape and Enter keys when in editing mode. Note that INMEMO used this flag value for the "no auto-shrink" option, which isn't applicable to XTREE. | |
&h00000200 |
Leave list box on the screen after exit from the subroutine. | |
XTF_TIMOUT |
&h00000400 |
For the PCKLST (text mode) only, sets a 200 second timeout—i.e., acts as if user had hit Escape. For XTREE, ignored; use XTR.TIMEOUT instead. |
XTF_FST |
&h00000800 |
Fast selection mode. In PCKLST, this means menu items can be selected by entering the minimum number of characters to uniquely identify the item. (Without the XTF_FST flag, Enter would be required to complete the selection.) For XTREE, this means that a single click (completes the selection operation, rather than requiring a double-click or a click followed by Tab). |
&h00001000 |
Control interpretation of first record. | |
XTF_XYXY |
&h00002000 |
Interpret the 1st and 2nd parameters (row, col) as starting row, starting col, and the 8th and 9th parameters (strow, endrow) as ending row, ending col. Mandatory for XTREE, optional for PCKLST. |
XTF_SORT |
&h00004000 |
Deprecated. Allow sorting. |
XTF_REORD |
&h00008000 |
Allow column reordering by drag and drop. (Note that if enabled globally, it can still be turned off for individual columns.) |
&h00010000 |
Allow multiple selections. | |
XTF_MLVL |
&h00020000 |
Multi-level (hierarchical) row support. This will be set automatically if the first column defined in coldef uses the @ code. Sample images here and here. Also see Multi-level Lists. |
&h00040000 |
Coldef parameter uses the advanced syntax. | |
XTF_VARY |
&h00080000 |
Variable height rows. Calculation is subject to maximum number of text lines per item as set in the xtrctl XTR.itemlines parameter. |
&h00100000 |
Exit immediately, rather than waiting for the user to make a selection. (This only makes sense in conjunction with XTF_MODELESS; also see xtrctl XTR.opcode) | |
&h00200000 |
Disable the tree control on exit. | |
XTF_DEL |
&h00400000 |
Enable Del exit (Exitcode –47) |
&h00800000 |
Return result via row number in answer parameter. | |
XTF_CTRLC |
&h01000000 |
Causes Ctrl+C to set Exitcode 10 (as in INFLD) instead of 1. |
XTF_EDITABLE |
&h02000000 |
Declares that the tree contains editable text (i.e. one or more columns with column format T or E). Without this flag, edits may appear to work, but the interpretation of the array parameter will probably be wrong, as it must be interpreted in a scope where the coldef parameter is not available. |
XTF_TOTALS |
&h04000000 |
Declare that last line of data contains totals (and thus is not to be sorted). |
&h08000000 |
Defeats redraw/refresh of data. | |
&h10000000 |
Item drag-drop (within a single XTREE control). | |
&h20000000 |
Activates split or dual-pane mode. | |
&h40000000 |
Prevents XTREE from exiting with EXITCODE 0. | |
Definition file: ashinc:xtree.def |
Jump to XTREE Flags2 table.
History
WARNING: Versions of A-Shell prior to 5.1.1146 will not recognize the XFLAGS structure format, causing XTREE to fail to understand any of your flags. If that presents a problem, the workaround is to map the flags argument as an array of two B,4 elements, e.g.
MAP1 FLAGS(2),B,4
In that case, pass FLAGS(1) for the flags argument and newer versions of A-Shell XTREE will just assume that you passed an array of two elements, with the 2nd element containing the XTF2_xxx flags, while older versions will just see the first element (containing the XTF_xxxx flags).
ATE, however, does not present any particular compatibility issues. Versions prior to 1146 simply won't see the XTF2_xxx flags. So, if you have only one or a few servers to update, but uncountable ATE clients, then it may be better to update those servers and use the XFLAGS format, since it is more extensible and A-Shell doesn't have to assume that there are at least 2 elements in the array.