# XTREE Flags1
> [HTML Version](xtreeflags1.htm)
_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](xtreeflags2.htm.md)[ Flags2](xtreeflags2.htm.md)), 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](xtreeflags2.htm.md)[ Flags2](xtreeflags2.htm.md). Also see [XTR.MISCFLAGS](xtr_miscflags.htm.md) for additional flags and more information.
| **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](mouse_and_keyboard.htm.md). |
| 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) |
| [XTF\_ENTESC](xtree-flags1b.htm.md#xtf_entesc) | \&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. |
| [XTF\_MODELESS](xtree-flags1b.htm.md#xtf_modeless) | \&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.TIMOUT 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). |
| [XTF\_FCOLDEF](xtree-flags1b.htm.md#xtf_fcoldef) | \&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](sortingxtreetech.htm.md) | \&h00004000 | 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.) |
| [XTF\_MSEL](xtree-flags1b.htm.md#xtf_msel) | \&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](listhierarchy.htm.md). [Sample images here](https://www.flickr.com/photos/147576700@N02/50584635188/in/album-72157716821830643/) and [here.](https://www.flickr.com/photos/147576700@N02/50584635208/in/album-72157716821830643/) Also see [Multi-level Lists](multi-levellists.htm.md). |
| [XTF\_COLDFX](xtf_coldfx2.htm.md) | \&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. |
| [XTF\_NOSEL](xtf_nosel2.htm.md) | \&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) |
| [XTF\_DISABLE](xtree-flags1b.htm.md#xtf_disable) | \&h00200000 | Disable the tree control on exit. |
| XTF\_DEL | \&h00400000 | Enable Del exit (Exitcode –47) |
| [XTF\_FILANS](xtree-flags1b.htm.md#xtf_filans) | \&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 | Indicates an [Editable Tree Control](editabletreecontrols.htm.md)—i.e. containing one or more editable columns. Note that although _cformat_ codes (E, T, etc.) may appear to activate editing mode by themselves, this flag needs to be set manually so that it can inform the handling of the _array_ parameter before the _coldef_ parameter can be parsed. |
| XTF\_TOTALS | \&h04000000 | Declare that last line of data contains totals (and thus is not to be sorted). |
| [XTF\_NOREDRAW](xtf_noredraw2.htm.md) | \&h08000000 | Defeats redraw/refresh of data. |
| [XTF\_DRAGDROP](xtf_dragdrop2.htm.md) | \&h10000000 | Item drag-drop (within a single XTREE control). |
| [XTF\_SPLIT](xtf_split2.htm.md) | \&h20000000 | Activates split or dual-pane mode. |
| [XTF\_NOZEROEX](xtree-flags1b.htm.md#xtf_nozeroex) | \&h40000000 | Prevents XTREE from exiting with EXITCODE 0. |
| | | **Definition file: **[ashinc:xtree.def](https://bitbucket.org/microsabio/soslib/src/master/907016/xtree.def) |
[Hex-Decimal Values](hex-decimalvalues.htm.md)
Jump to [XTREE Flags2](xtreeflags2.htm.md) table.