GEOS SDK TechDocs|
|
3.1 Table Attributes |
3.3 Working with Rows TableColumnDefinition, TableColumnFlags, TableRangeInversionType, MSG_GEN_TABLE_GET_COLUMN_COUNT
When you create a
Table
object, you must specify what columns the
Table
has. Typically, each column will represent a different kind of data, and can be of a different length. When you define a
Table
object, you specify how many columns the table will have; this number is fixed for the table, and cannot be changed later. (It is possible to have your Table switch the column definitions that they use, although it will take a fair amount of work on your part; that is discussed in Changing Column Definitions.) You can find out how many columns a table has by sending it
MSG_TABLE_GET_COLUMN_COUNT
.
Each column has its own definition--stored in the Table's TI_
columnDefinitions
array--specified by a
TableColumnDefinition
structure that cannot be changed later. This structure has the following definition:
typedef struct {
TableColumnFlags TCD_flags;
word TCD_width;
} TableColumnDefinition;
_flags
TableColumnFlags
record (described on The TableColumnFlags record has the following flags: below).
_width
The
TableColumnFlags
record has the following flags:
Table
object will send itself MSG_TABLE_SELECT.
Table
object will send itself MSG_TABLE_SELECT.
Table
object will send itself MSG_TABLE_SELECT.
Table
object will present a
VisText
, allowing the user to edit the contents of the cell. (See Editing Cells.)
Table
object will send itself MSG_TABLE_SELECT.
TableRangeInversionType
enumerated type; it specifies how the
Table
should display selected cells in this column.
TableRangeInversionType
specifies which cells should be drawn as highlighted when the user performs a selection action. Note that each column has its own
TableRangeInversionType
value. If a selection action crosses from one column into another, the
Table
uses the
TableRangeInversionType
of the last column the pointer was in.
TableRangeInversionType
has the following values:
Table
should not highlight any selections.
When you create a
Table
, you must specify how many columns the table has, and what the characteristics of each column are. You specify the number of columns the
Table
has by setting TI
_columns
to that number. You cannot change the number of columns in the
Table
after the
Table
has been created. To find out how many columns a
Table
has, send it
MSG_TABLE_GET_COLUMN_COUNT
.
To specify the attributes of each column, you must create a chunk in the same object block as the
Table
. That chunk must contain an array of
TableColumnDefinition
structures, one for each column in the
Table
. The structures should be in the same order as the columns (i.e. the left-most column would be the first structure in the array).
word MSG_GEN_TABLE_GET_COLUMN_COUNT();
This message returns the number of columns in a
Table
object.
Source: Unrestricted.
Destination: Any
Table
object.
Parameters: None.
Return: The number of columns in the
Table
.
GEOS SDK TechDocs|
|
3.1 Table Attributes |
3.3 Working with Rows