Please enable JavaScript to view this site.

A-Shell Development History

Navigation: Version 4.9/5.0, builds 850-998 > 993 - 24 July 07

Advanced Coldef option SharedList

Scroll Prev Top Next More

Shared lists (combo boxes) can now be associated with individual cells rather than just entire columns. To implement, first define one or more lists (associated with column 0) using the new SharedList= advanced column option:

SharedList=id,item1,item2,...itemN

The format of SharedList= is identical to List= except that it must begin with a single lower case letter, a-z, which serves as an identifier for the list (allowing up to 26 lists to be defined).

To associate one of the predefined lists with a cell, use the new cformat code "s" to define the column as being capable of referencing the lists. Cformat "s" is similar in concept to B (background cell color) in that it reserves the first character of each cell in the column for the index letters that associate the cell with one of the predefined lists.

NOTE: if the column also uses cformat B, then the first character of the column is for the cell color code, and the second character will be for the SharedList ID.

Note that in additional to allowing different lists for different cells within the same column, as well as the same list to be referenced from multiple columns, you may also define individual cells has having no list (by leaving the ID character blank), or even off-limits to editing (by setting the ID character to "|").

As with cell background colors, the byte reserved for the SharedList ID must also be accounted for in the answer array.

The sample program XTRA5C illustrates some of these variations.