Please enable JavaScript to view this site.

A-Shell Reference

Navigation: Subroutines > XTREE > XTREE Parameters > Coldef

Advanced Coldef Options

Scroll Prev Top Next More

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

~option = value

Each option=value pair must be delimited on both sides by a single tilde, with a double tilde marking the end of the column definition.

Example

COLDEF + = "10~15~Title~S~Color=3,7~Scale=200~Filter=PATTERN~ClickExit=-88,89~~"

The above example shows a complete definition for one column, starting in position 10, with width 15, column header "Title", type S, and the three option=value pairs.

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

Option

Description

AutoNumber

Defines a column whose contents are filled automatically starting with the specified base number, and incrementing by 1 for each data row in the tree.

Caption

Used with XTF2_POPUP to specify the caption of the popup window housing the XTREE.

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.

DragDropExit

DragDropExit=###, 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, DragDropExit=150 will generate exitcode -150. See XTF2_DRAGDROP2

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.

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.

ExportFspec

ExportFspec=<filespec> will set the name of an exported CSV or XLSX file. If name is not specified, system will use the TreeID for the export file name. If option is not specified, the filename will revert to the previous default—XTREE-<jobnam> for the CSV2XL export and ASHGRID for the CSV export.

ExportOptions

Sets various options related to the export-to-CSV function.

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.

FileListX

In conjunction with LookupX, automatically fills in a target cell based on the contents of a source cell, using an external lookup table.

Filter

Overrides the default Auto-Filter type. Choices are CB, Range, Pattern, None.

FilterInitialState

If set to Disabled, causes the auto-filter button in the column header to initially be hidden. Users can right-click on the tree to toggle the visibility of the auto-filter buttons.

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.

Format

Provides a way to configure the behavior of the Windows Time and Date Picker control associated with an editable date and/or time column.

Footer

Set page footer.

FooterFont

Define footer font. Uses same syntax as HdrFont.

FooterScale

Define scale for footer text. Uses same syntax as HdrScale.

FooterClickExit

Define exitcode(s) for clicking on footer. Same syntax as ClickExit.

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.

HdrDspMin

Set minimum display width for row headers in grid column units. (HdrDspMin=5) See XTR.SHOWROWHDR.

HdrDspWid

Set display width for row headers in grid column units. (HdrDspWid=15) See XTR.SHOWROWHDR.

HdrFont

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

HdrLines

This is 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

ImgDflt

Specifies the default image that will be displayed if and when the specified image is not found.

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.

ItemIconDir

Default directory for item icons. This is similar to ImgDir but for item icons. see XTF2_ITEMICONS

ItemIcons

Define item icons. ItemIcons=closed-img,opened-img{,leaf-img}; see XTF2_ITEMICONS.

ItemIconSiz

ItemIconSiz=iwidth,iheight,bpp  Similar to ImgSiz but for item icons; see XTF2_ITEMICONS.

ItemIconCount

=<# icons to load>,<grow-by-value>  Similar to ImgCount but for item icons; see XTF2_ITEMICONS.

List

Define combobox entries for column type l.

Listx

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

LoadOptions

Control loading of data into a tree.

LookupX

Fills in a target cell based on the contents of a source cell, using an external lookup table.

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.

RGBbg

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

RGBbg#

Associate checkbox and radio button states with background colors.

RGBfg

Define a foreground color specification.

RGBfgbg

Specifies foreground and background colors for individual cells.

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.

RGBbgFooter

Define footer background color. Uses same syntax as RGBbgTotals.

RGBfgFooter

Define footer foreground color. Uses same syntax as RGBbgTotals.

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.

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/Down-arrows.

SelChgExit

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

Title

Set page title.

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.