The Table Objects: 3.3 TableClass Instance Data: Working with Rows

Up: GEOS SDK TechDocs| Up | Prev: 3.2 Defining Columns | Next: 4 Using a Table Object
TableRowFlags, MSG_TABLE_GET_ROW_FLAGS, MSG_TABLE_SET_ROW_FLAGS, MSG_TABLE_GET_ROW_COUNT, MSG_TABLE_SET_ROW_COUNT

In a Table object, rows and columns are fundamentally different. Each column has its own properties; columns are generally used to display different kinds of information. Rows, on the other hand, are similar throughout a Table . Each row may contain different data, but all rows have the same basic structure throughout a given Table .

This has some consequences. For example, all columns are usually displayed; the Table should be wide enough to display all visible columns at once.

All the rows, on the other hand, are generally not displayed at once. The Table will display as many rows as it has room for; the user can scroll the table to see other rows. Also, while there are row properties (defined in TableRowFlags ) that are similar in nature to the column properties defined in TableColumnFlags , you cannot set these properties individually for a row; all rows must have the same TableRowFlags .

The instance data field TI _rowFlags specifies what TableRowFlags will be used for every row in the table. TableRowFlags is a word-sized record with the following field:

TRF_DRAW_ROW_SEPARATOR
If this field is set, the Table will draw a line below each column separating the rows. No line will be drawn below the Table's last row.

To find out how TI _rowFlags is set, send MSG_TABLE_GET_ROW_FLAGS to the Table . To change the settings in this field, send MSG_TABLE_SET_ROW_FLAGS.

To find out how many rows a table has, send it MSG_TABLE_GET_ROW_COUNT . You can also add or remove rows at will by sending MSG_TABLE_SET_ROW_COUNT. This message adds rows to, or removes them from, the end of the Table .

MSG_TABLE_GET_ROW_FLAGS

TableRowFlags MSG_TABLE_GET_ROW_FLAGS();

This message returns the current settings of a Table object's TI _rowFlags field. This field holds the TableRowFlags used for every row in the Table .

Source: Unrestricted.

Destination: Any TableClass object.

Parameters: Nothing.

Return: The TableRowFlags used for all rows in the Table .

Structures: TableRowFlags (described on TRF_DRAW_ROW_SEPARATOR If this field is set, the Table will draw a line below each column separating the rows. No line will be drawn below the Table's last row.).

MSG_TABLE_SET_ROW_FLAGS

void	MSG_TABLE_SET_ROW_FLAGS(
        TableRowFlags		flags);

This message changes current settings of a Table object's TI _rowFlags field. This field holds the TableRowFlags used for every row in the Table .

Source: Unrestricted.

Destination: Any TableClass object.

Parameters: flags This is the new set of TableRowFlags to be used for every row in the Table .

Return: Nothing.

Structures: TableRowFlags (described on TRF_DRAW_ROW_SEPARATOR If this field is set, the Table will draw a line below each column separating the rows. No line will be drawn below the Table's last row.).

MSG_TABLE_GET_ROW_COUNT

word	MSG_TABLE_GET_ROW_COUNT();

This message returns the total number of rows in a Table object.

Source: Unrestricted.

Destination: Any TableClass object.

Parameters: Nothing.

Return: The number of rows in the Table .

MSG_TABLE_SET_ROW_COUNT

void	MSG_TABLE_SET_ROW_COUNT(
        word	rowCount);

This message changes the Table object's total number of rows. If the new row count is smaller than the old one, the last rows will be truncated.

Source: Unrestricted.

Destination: Any TableClass object.

Parameters: rowCount The new number of rows the Table should contain. Rows are added and removed at the end of the Table .

Return: Nothing.


Up: GEOS SDK TechDocs| Up | Prev: 3.2 Defining Columns | Next: 4 Using a Table Object