Advanced Coldef Options

Zero or more of the following options may be specified to further define column options. Syntax is:

~option = value~

Example

COLDEF = COLDEF + "10~15~Title~S~Color=3,7~Scale=200~~"

Note that both options and values are case sensitive. Additional examples may be found in the Advanced Syntax Example.

Option

Description

CellList

Use to associate shared lists (combo boxes) with individual cells rather than entire columns.

CellListX

List substitution style (aka INFLD ||L) combo lists. See ListX and CellListX.

ClickExit

Define Exitcode values for left and right click on the column. Applies to all columns if the ClickExit clause is associated with column 0, otherwise applies only to the specific column. A right-click value in ClickExit takes precedence over PopupMenu. Format: ClickExit=<left exitcode>,<right exitcode>. See also XTR'KBDSTR.

CollapseExit

Triggers an exitcode when a branch is collapsed; see ExpandExit.

Color

A pair of digits, comma separated, representing the desired foreground and background text color for the column, from the A-Shell palette. Use only if you want the column to have a different color scheme from the others. E.g.: Color=1,2. (Foreground color one, background color two). Also see RGBbg, RGBfg.

ColOptRows

Determines how many rows are considered when optimizing the column widths.

CtlName

You can assign a name to an XTREE control by adding the coldef clause "CtlName=name" to any column (where name is the name you want to assign).

CurSym

Defines an alternate currency symbol to replace the $ in a mask (e.g. Mask=$###,###.##).

Data

Use to define the contents of a Constant Data Column.

DefaultFont

Sets the default font for the entire tree. The syntax is the same as for Font.

DefaultScale

A font scaling percentage (100=normal), e.g. DefaultScale=120. Works similarly to Scale, except that it affects all subsequent columns, not just the current column. Furthermore, if specified with a pseudo-column, it affects all the rows, eliminating the need to define a special font column with coldef code "f". This makes it much easier to apply a scale factor to an entire tree. Note also that the DefaultScale value is taken into consideration when XTREE determines the row height for fixed-height rows. HdrScale=0 and DefaultScale=0 are interpreted as requesting the default Windows desktop font size.

DragDropClick

DragDropClick=###, where ### is the negative exitcode to be generated when an item (or items) from the source tree is/are dropped on to the destination tree. For example, DragDropClick=150 will generate exitcode -150.

DragDrop

Protect

DragDropProtect=### allows ### rows at the top (or -### rows at the bottom) to be protected from drag/drop operations. Note that because sorting would confuse the issue, DragDropProtect=### will automatically set HdrLines=### (if ### positive and HdrLines not already set), and TotalLines=### (if ### negative and TotalLines not already set). Also supported is the syntax DragDropProtect=##,##, which will protect rows at the top of the screen (first number) and the bottom (second number); use positive values for each.

DropExit

"DropExit=###" may be used to force XTREE to exit with the specified exit code (###) at the completion of a Drag/Drop operation. Note that the exitcode will be -### (i.e. DropExit=88 will return exitcode -88 on a drag/drop). This is the same syntax as SelChgExit=###.

Dspmin

Similar to Dspwid except sets the minimum display width. (Unless the column is locked with the cformat L option, the user can resize the column, subject to this minimum.) E.g. Dspmin=5. The dspmin option is overridden by the hidden column (H) option. See

 

Dspwid

Sets the initial display width of the column, e.g. Dspwid=10.

EnterGoTo

EnterGoto=# specifies the column # to jump to when the Enter key is hit.

ExitChars

Defines a set of characters that will force an exit from the tree.

ExpandExit

Triggers an exitcode when a branch is expanded.

FastMax

FastMax=# sets the number of characters for an editable text or combo field which can be entered before it automatically advances to the next field. Supercedes InfDef=F, which no longer does anything. This clause is compatible with cell validation. Change In A-Shell 1377 of March 2014: FastMax=1 now causes the cell to exit after clicking on a new selection in the dropdown list, or after using the up/down arrow keys to change the selection and then hitting ENTER.

FixedLayout

Causes XTREE to handle the specified column in a more "INMEMO-friendly" manner.

Fold

Fold = <Upper or Lower>. For editable cells, this flag causes contents to be automatically folded. The folding applies during editing of cell but does not change the underlying data. See Cformat ^. Also see Coldef Default.

Font

A font face name and/or font attribute code, separated by a comma. See Coldef Default.

Footer

See Title and Footer.

Format

Sets options related to the Date/Time Picker control associated with an editable date/time column.

Group

Associate a radio button cell with a Radio Button Group.

HdrClickExit

When specified, clicking on this column header causes an exit with the specified exitcode.

HdrFont

Same format and concept as Font, but applies to the header row.

HdrLines

This analogous to the TotalLines option, but allows you to specify a number of lines at the top of the tree that are to be treated as fixed headers and thus not included in sorting.

HdrScale

This is to Scale as HdrFont is to Font, e.g. HdrScale=125. HdrScale=0 and DefaultScale=0 are interpreted as requesting the default Windows desktop font size.

ImgCount

Required with cformat I to allocate space for the image storage

ImgDir

Optional with cformat I to specify the default image directory

ImgSiz

Required with cformat I to define image size and scale parameters

InfDef

Used to specify some variations of XTREE editable cell behaviour using INFLD TYPE codes.

List

Define combobox entries for column type l.

Listx

List substitution style (aka INFLD ||L) combo lists. See List and ListX and CellListX.

Mask

Define a numeric formatting mask

MaskView

This is identical to the existing Mask option, except that the non-numeric mask characters (relative to the current LDF) are stripped from the editable fields returned in the answer array. This is most convenient when you plan to use the data returned from the tree in numeric calculations, where the mask formatting characters may interfere with the conversion from string to number. Added in A-Shell 6.3.1514, June 2016.

NegFgBg

Allows control over the color used to display numeric cells with negative values.

PopupMenu

Defines a popup menu that will appear when the user right-clicks on a row.

ParentID

Specify the alphanumeric control ID (see Control names) of the parent control. XTR'PARENTID (in Xtrctl) must be set to zero.

Print

Disables printing on popup menu, including with ^P.

RGBfg

Define a foreground color specification.

RGBbg

Define a background color, for a column or to be used for a row or cell.

RGBignore

Applies to editable text columns, and is equivalent to RGBbg except that it only applies to cells that are marked to ignore. Cells are marked to ignore by placing a "|" in the first column of the answer array for that cell.

RGBfgSel, RGBbgSel

Define the foreground/backgroud colors for the selection bar; see RGBfgSel and RGBbgSel.

RGBfgHeaders, RGBbgHeaders

Define the foreground/background colors for the header line; see Headers and Totals Colors.

RGBfgTotals, RGBbgTotals

Define the foreground/background colors for the totals line; see Headers and Totals Colors.

RGBbgOdd, RGBbgEven

Define the default background color for the odd and even rows. This is typically used to create a "green bar" effect to improve readability. Although this could be done using using individual row colors, the problem is that sorting would mess up the effect by requiring that you handle your own sorting via HdrClickExit. Note that any other color settings pertaining to individual rows or cells will override these. The format for these is the same as for RGBfgSel and RGBbgSel. If only specifying one of these values, use RGBbgOdd. Sample image here.

RGBbgAll

RGBbgAll=r,g,b sets background color for all rows and columns. Affects even unpopulated rows, unlike all other RGBbg options except RGBbgEven and RGBbgOdd.

Scale

A font scaling percentage (100=normal). (e.g. Scale=50). When associated with a real column, the font defined (indirectly via the scale factor) affects just that column. When associated with a pseudo column (i.e. with cwidth = 0) it just serves to define the font so that it can be referred to by data in a font definition column for applying specific fonts to individual rows (see cformat f in the table above). See Font and Default Scale.

ScrollMode

Change the operation of Up/DownArrows to act like Ctrl+Up/DownArrows.

SelChgExit

Causes XTREE to exit with exitcode -### whenever the selection changes.

Title

Title=<clause>. Used as a page head and window title when using the XTREE print function. <Clause> supports one or two "|" delimiters to separate it into Left|Center|Right. If no delimiters, the text is used as the right title, and the default left title is the date. If one delimiter, it is treated as Left|Right.

TotalLines

TotalLines=# where # is the number of lines at the bottom of the list which represent totals and thus should not participate in sorting. TotalLines=1 is equivalent to setting flag XTF_TOTALS.

Tooltip

Specify a custom tooltip for the column.

TreeID

Tree=<identifier> identifies this tree uniquely to enable Saving User Adjustments specific to this tree.

VertAlign

Overrides default vertical centering of text or images within each cell. Choices are Top and Bottom—e.g. VertAlign=Top.

 

Note 1: When option is associated with the pseudo zero column, it becomes the default for all subsequent columns. That default can be overridden by individual column settings.