Please enable JavaScript to view this site.

A-Shell 6.5 Development Notes

A new Advanced Coldef option has been added to XTREE:

AutoNumber=<base>

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. This is similar to the XTR'SHOWROWHEADER feature in that the column appears immune to sorting, and that collapsed rows in multilevel trees are counted (causing visual gaps in the numbering), while rows filtered out are not counted. Unlike the row headers, an AutoNumber column otherwise shares most of the features of a normal column, i.e. can be in any position, have a column header, column color attributes, a context menu, click codes, can be moved or resized, etc.

As with the constant data column feature (activated via the Advanced Coldef option "Data"), an AutoNumber column does not occupy any space in the data array. To indicate this, you must set the cpos and cwidth fields in the coldef definition to -1, e.g.

coldef$ += "-1~-1~ ~#~AutoNumber=1~RGBbg=200,225,250~~"

(Minus one, tilde, minus one, tilde, column title, tilde, format, tilde, advanced coldef options starting with AutoNumber.)

Note that in the above example, the two minus one values and the AutoNumber clause are essential. The column title could be anything (blank in this example); the format code could be anything that makes sense for a numeric column. Additional advanced coldef options can be added as appropriate to specify a background color (as in this example), click codes, etc.