File

This specifies a sequential file to be used for input instead of the array parameter. When non-null, the interpretation of array, addcnt, and answer parameters changes as follows.

If neither the multiple selection (XTF_MSEL) nor XTF_FILANS flags are set, then array becomes an ordinary string, which is used to pass in the default selection (text) and to get back the item chosen by the user, and answer is ignored. Note that here the default selection mechanism works only on the first column; if its cells are not all unique, you may not end up with the desired item selected. The workaround is to use XTF_FILANS to select the default by row number, or to add a first column that is unique.

If XTF_MSEL is not set but XTF_FILANS is set, then array is still treated as an ordinary string which returns the text of the item chosen, but answer is used exactly as in array mode (to return the row number of the selected item, and to pass in the default row number).

If the multiple selection flag (XTF_MSEL) is set, then array is ignored and answer is treated as an array of one byte selection flags, exactly as for multiple-selection array mode. addcnt should be set to 0 to load the entire file, or else set to the number of records (lines) to be loaded.

The default selection process (in single-selection mode) works only on the first column. If the cells in the first column are not all unique, then you may not end up with the desired item selected. The only workaround is to add a first column that is unique, or to switch to the array mode, which identifies selections by the array index. Also note that XTREE supports the PCKLST "hidden text" feature, which allows you to pass hidden text in the last column of the data by preceding it with a \. Although this technique is useful for associating control information with list items without having to display it, a better way to do this with XTREE is to just define a hidden column. The \hidden text feature is preserved just for compatibility with PCKLST.

XTREE supports the PCKLST "hidden text"feature, which allows you to pass hidden text in the last column of the data by preceding it with a backslash ("\").  Although this technique is useful for associating control information with list items without having to display it, the feature is support merely for backward compatibility with PCKLST and is otherwise deprecated. The preferred approach to embedding hidden data with XTREE is to define a separate hidden column. Note that in CSV mode (a variation of file mode; see XTF2_CSV), the special treatment of the backslash applies to every column, not just the last. To treat the backslash as a normal data character, use the advanced Coldef feature XTF_COLDFX and add the "\" code to the Cformat specification for any column.