Subroutines > Detailed Descriptions > XTREE > XTREE Parameters > coldef
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>

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).

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.

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.

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 Coldef Default.

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.

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.

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

Footer = <clause>  Allows you to specify a pager footer to be used when printing an XTREE through the print/preview mechanism. See "Title" in this table for <clause> options.

Format

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

Group

Group=<number, 0-255. Associates a radio button with a logical group, so that more than one group of radio buttons may be supported within each row. The default group is 0.

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

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

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.

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


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

RGBbgSel

RGBfgHeaders


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

RGBbgHeaders

RGBfgTotals


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

RGBbgTotals


RGBbgOdd

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.

RGBbgEven

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.

As of A-shell 1160 of October 2009, Title= coldef 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

Dpecify a custom tooltip for the column.

TreeID

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

 

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.