class Fox::FXTable

The FXTable widget displays a table of items, each with some text and optional icon. A column Header control provide captions for each column, and a row Header control provides captions for each row. Columns are resizable by means of the column Header control if the TABLE_COL_SIZABLE option is passed. Likewise, rows in the table are resizable if the TABLE_ROW_SIZABLE option is specified. An entire row (column) can be selected by clicking on the a button in the row (column) Header control. Passing TABLE_NO_COLSELECT disables column selection, and passing TABLE_NO_ROWSELECT disables column selection. When TABLE_COL_RENUMBER is specified, columns are automatically renumbered when columns are added or removed. Similarly, TABLE_ROW_RENUMBER will cause row numbers to be recalculated automatically when rows are added or removed. To disable editing of cells in the table, the TABLE_READONLY can be specified. Cells in the table may or may not have items in them. When populating a cell for the first time, an item will be automatically created if necessary. Thus, a cell in the table takes no space unless it has actual contents. Moreover, a contiguous, rectangular region of cells in the table may refer to one single item; in that case, the item will be stretched to cover all the cells in the region, and no grid lines will be drawn interior to the spanning item.

The Table widget issues SEL_SELECTED or SEL_DESELECTED when cells are selected or deselected, respectively. The table position affected is passed along as the 3rd parameter of these messages. Whenever the current (focus) item is changed, a SEL_CHANGED message is sent with the new table position as a parameter. When items are added to the table, a SEL_INSERTED message is sent, with the table range of the newly added cells as the parameter in the message. When items are removed from the table, a SEL_DELETED message is sent prior to the removal of the items, and the table range of the removed cells is passed as a parameter. A SEL_REPLACED message is sent when the contents of a cell are changed, either through editing or by other means; the parameter is the range of affected cells. This message is sent prior to the change. SEL_CLICKED, SEL_DOUBLECLICKED, and SEL_TRIPLECLICKED messages are sent when a cell is clicked, double-clicked, or triple-clicked, respectively. A SEL_COMMAND is sent when an enabled item is clicked inside the table.

Events

The following messages are sent by FXTable to its target:

SEL_COMMAND

sent when a new item is clicked; the message data is an FXTablePos instance indicating the current cell.

SEL_KEYPRESS

sent when a key goes down; the message data is an FXEvent instance.

SEL_KEYRELEASE

sent when a key goes up; the message data is an FXEvent instance.

SEL_LEFTBUTTONPRESS

sent when the left mouse button goes down; the message data is an FXEvent instance.

SEL_LEFTBUTTONRELEASE

sent when the left mouse button goes up; the message data is an FXEvent instance.

SEL_RIGHTBUTTONPRESS

sent when the left mouse button goes down; the message data is an FXEvent instance.

SEL_RIGHTBUTTONRELEASE

sent when the left mouse button goes up; the message data is an FXEvent instance.

SEL_SELECTED

sent when a cell is selected; the message data is an FXTablePos instance indicating the position of the selected cell.

SEL_DESELECTED

sent when a cell is deselected; the message data is an FXTablePos instance indicating the position of the deselected cell.

SEL_CHANGED

sent when the current cell changes; the message data is an FXTablePos instance indicating the current cell.

SEL_CLICKED

sent when a cell is single-clicked; the message data is an FXTablePos instance indicating the current cell.

SEL_DOUBLECLICKED

sent when a cell is double-clicked; the message data is an FXTablePos instance indicating the current cell.

SEL_TRIPLECLICKED

sent when a cell is triple-clicked; the message data is an FXTablePos instance indicating the current cell.

SEL_DELETED

sent when a range of cells is about to be removed; the message data is an FXTableRange instance indicating the cells to be removed.

SEL_INSERTED

sent when a range of cells has been inserted; the message data is an FXTableRange instance indicating the cells inserted.

SEL_REPLACED

sent when a range of cells has been replaced; the message data is an FXTableRange instance indicating the cells replaced.

Table options

TABLE_COL_SIZABLE

Columns are resizable

TABLE_ROW_SIZABLE

Rows are resizable

TABLE_NO_COLSELECT

Disallow column selections

TABLE_NO_ROWSELECT

Disallow row selections

TABLE_READONLY

Table is not editable

TABLE_COL_RENUMBER

Renumber columns

TABLE_ROW_RENUMBER

Renumber rows

Message identifiers

ID_HORZ_GRID

x

ID_VERT_GRID

x

ID_TOGGLE_EDITABLE

x

ID_DELETE_COLUMN

x

ID_DELETE_ROW

x

ID_INSERT_COLUMN

x

ID_INSERT_ROW

x

ID_SELECT_COLUMN_INDEX

x

ID_SELECT_ROW_INDEX

x

ID_SELECT_COLUMN

x

ID_SELECT_ROW

x

ID_SELECT_CELL

x

ID_SELECT_ALL

x

ID_DESELECT_ALL

x

ID_MOVE_LEFT

x

ID_MOVE_RIGHT

x

ID_MOVE_UP

x

ID_MOVE_DOWN

x

ID_MOVE_HOME

x

ID_MOVE_END

x

ID_MOVE_TOP

x

ID_MOVE_BOTTOM

x

ID_MOVE_PAGEDOWN

x

ID_MOVE_PAGEUP

x

ID_START_INPUT

x

ID_CANCEL_INPUT

x

ID_ACCEPT_INPUT

x

ID_MARK

x

ID_EXTEND

x

ID_CUT_SEL

x

ID_COPY_SEL

x

ID_PASTE_SEL

x

ID_DELETE_SEL

x