Table Widget
Attributes
visibleRows: | number of visible rows [Integer]
|
visibleCols: | number of visible columns [Integer]
|
numRows: | number of rows [Integer]
|
numCols: | number of columns [Integer]
|
marginTop: | top cell margin, in pixels [Integer]
|
marginBottom: | bottom cell margin, in pixels [Integer]
|
marginLeft: | left cell margin, in pixels [Integer]
|
marginRight: | right cell margin, in pixels [Integer]
|
tableStyle: | table style [Integer]
|
leadingRows: | number of leading rows [Integer]
|
trailingRows: | number of trailing rows [Integer]
|
leadingCols: | number of leading columns [Integer]
|
trailingCols: | number of trailing columns [Integer]
|
defColumnWidth: | default column width, in pixels [Integer]
|
defRowHeight: | default row height, in pixels [Integer]
|
currentRow: | row number for current cell [Integer]
|
currentColumn: | column number for current cell [Integer]
|
anchorRow: | row number for anchor cell [Integer]
|
anchorColumn: | column number for anchor cell [Integer]
|
font: | text font [FXFont]
|
textColor: | text color [FXColor]
|
baseColor: | base GUI color [FXColor]
|
hiliteColor: | highlight color [FXColor]
|
shadowColor: | shadow color [FXColor]
|
borderColor: | border color [FXColor]
|
selBackColor: | background color for selected cell(s) [FXColor]
|
selTextColor: | text color for selected cell(s) [FXColor]
|
gridColor: | grid color [FXColor]
|
stippleColor: | stipple color [FXColor]
|
cellBorderColor: | cell border color [FXColor]
|
cellBorderWidth: | cell border width, in pixels [Integer]
|
helpText: | status line help text [String]
|
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.
|
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
|
Message identifiers
ID_HORZ_GRID: | x
|
ID_VERT_GRID: | x
|
ID_DELETE_COLUMN: | x
|
ID_DELETE_ROW: | x
|
ID_INSERT_COLUMN: | x
|
ID_INSERT_ROW: | 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_MARK: | x
|
ID_EXTEND: | x
|
ID_CUT_SEL: | x
|
ID_COPY_SEL: | x
|
ID_PASTE_SEL: | x
|
ID_BLINK: | x
|
anchorColumn |
[R] |
|
anchorRow |
[R] |
|
baseColor |
[RW] |
|
borderColor |
[RW] |
|
cellBorderColor |
[RW] |
|
cellBorderWidth |
[RW] |
|
currentColumn |
[R] |
|
currentRow |
[R] |
|
defColumnWidth |
[RW] |
|
defRowHeight |
[RW] |
|
font |
[RW] |
|
gridColor |
[RW] |
|
helpText |
[RW] |
|
hiliteColor |
[RW] |
|
leadingCols |
[RW] |
|
leadingRows |
[RW] |
|
marginBottom |
[RW] |
|
marginLeft |
[RW] |
|
marginRight |
[RW] |
|
marginTop |
[RW] |
|
numCols |
[R] |
|
numRows |
[R] |
|
selBackColor |
[RW] |
|
selTextColor |
[RW] |
|
shadowColor |
[RW] |
|
stippleColor |
[RW] |
|
tableStyle |
[RW] |
|
textColor |
[RW] |
|
trailingCols |
[RW] |
|
trailingRows |
[RW] |
|
visibleCols |
[RW] |
|
visibleRows |
[RW] |
|
Enumerable
Returns the drag type for CSV data
Returns the drag type name for CSV data
new(p, visRows, visCols, tgt=nil, sel=0, opts=0, x=0, y=0, w=0, h=0, pl=DEFAULT_MARGIN, pr=DEFAULT_MARGIN, pt=DEFAULT_MARGIN, pb=DEFAULT_MARGIN) {|theTable| ...}
|
Make new table with visRows visible rows and visCols
visible columns; the table is initially empty, i.e. contains no cells
(numRows and numCols are both zero).
Is horizontal grid shown?
Show or hide horizontal grid
Show or hide vertical grid
Resize the table content to numRows rows and numCols
columns. If notify is true, then
- a SEL_DELETED message will be sent to the table's message target
indicating which cells (if any) are about to be destroyed as a result of
the resize;
- a SEL_INSERTED message will be sent to the table's message target
indicating which cells (if any) were added as a result of the resize; and,
- a SEL_CHANGED message will be sent to the table's message target
indicating the new current cell.
Determine row containing y; returns -1 if y outside of
table
Determine column containing x; returns -1 if x outside of
table
Return the item (a reference to an FXTableItem) at the given row and
column. Raises IndexError if either row or
column is out of bounds.
Replace the item at the given row and column with a
(possibly subclassed) item. Raises IndexError if either
row or column is out of bounds.
Scroll to make cell at (row, column) fully visible.
Raises IndexError if either row or column is out of
bounds.
Set column width. Raises IndexError if column is out of bounds.
Get column width. Raises IndexError if column is out of bounds.
Set row height. Raises IndexError if row is out of bounds.
Get row height. Raises IndexError if row is out of bounds.
Set x-coordinate for column. Raises IndexError if column is out of
bounds.
Get x-coordinate of column. Raises IndexError if column is out of
bounds.
Set y-coordinate of row. Raises IndexError if row is out of
bounds.
Get y-coordinate of row. Raises IndexError if row is out of
bounds.
Modify cell text for item at specified row and column.
Raises IndexError if either row or column is out of
bounds.
Return cell text for item at specified row and column.
Raises IndexError if either row or column is out of
bounds.
Modify cell icon. Raises IndexError if either row or
column is out of bounds.
Return item icon. Raises IndexError if either row or
column is out of bounds.
Modify cell user data. Raises IndexError if either row or
column is out of bounds.
Return cell user data. Raises IndexError if either row or
column is out of bounds.
Returns true if the cell at position (row,
column) is selected. Raises IndexError if either row or
column is out of bounds.
Returns true if the cell at position (row,
column) is the current cell. Raises IndexError if either
row or column is out of bounds.
Returns true if the cell at position (row,
column) is visible. Raises IndexError if either row or
column is out of bounds.
Returns true if the cell at position (row,
column) is enabled. Raises IndexError if either row or
column is out of bounds.
Repaint cells between grid lines (startRow, endRow) and
grid lines (startCol, endCol). Raises IndexError if any
of the starting or ending grid lines is out of bounds.
Repaint cell. Raises IndexError if either row or column
is out of bounds.
Enable cell. Raises IndexError if either row or column is
out of bounds.
Disable cell. Raises IndexError if either row or column
is out of bounds.
Select cell. If notify is true, a SEL_SELECTED
message is sent to the table's message target after the item is selected.
Raises IndexError if either row or column is out of
bounds.
Deselect cell. If notify is true, a
SEL_DESELECTED message is sent to the table's message target after
the item is deselected. Raises IndexError if either row or
column is out of bounds.
Toggle cell. If notify is true, a SEL_SELECTED
or SEL_DESELECTED message is sent to the table's message target
after the item is (de)selected. Raises IndexError if either row or
column is out of bounds.
Change current cell. If notify is true, a
SEL_CHANGED message is sent to the table's message target after
the current item changes. Raises IndexError if either row or
column is out of bounds.
Change anchored cell. Raises IndexError if either row or
column is out of bounds.
Select range. If notify is true, a SEL_SELECTED
message is sent to the table's message target for each newly-selected cell.
Raises IndexError if startRow, endRow,
startColumn or endColumn is out of bounds.
Extend selection. If notify is true, a series of
SEL_SELECTED and SEL_DESELECTED messages are sent to the
table's message target after each affected item is selected or deselected.
Raises IndexError if either row or column is out of
bounds.
Kill selection. If notify is true, a
SEL_DESELECTED message is sent to the table's message target for
each cell that was previously selected.
Change cell background color. The values for row and
column are either zero or one. If the value is zero, this
background color is used for even-numbered rows (columns). If the value is
one, this background color is used for odd-numbered rows (columns). See
also getCellColor.
Obtain cell background color. The values for row and
column are either zero or one. If the value is zero, returns the
background color used for even-numbered rows (columns). If the value is
one, returns the background color used for odd-numbered rows (columns). See
also setCellColor.
drawCell(dc, xlo, xhi, ylo, yhi, xoff, yoff, startRow, endRow, startCol, endCol)
|
drawRange(dc, xlo, xhi, ylo, yhi, xoff, yoff, rlo, rhi, clo, chi)
|
Insert numRows rows beginning at the specified row
number. If row is equal to the number of rows in the table, the
new rows are added to the bottom of the table. If notify is
true, a SEL_INSERTED message is sent to the table's
message target for each cell that is inserted. Raises IndexError if
row is out of bounds.
Insert numColumns columns beginning at the specified
column number. If column is equal to the number of
columns in the table, the new columns are added to the right of the table.
If notify is true, a SEL_INSERTED message is
sent to the table's message target for each cell that is inserted. Raises
IndexError if column is out of bounds.
Remove the nr rows starting at the specified row. If
notify is true, a SEL_DELETED message is sent to
the table's message target for each cell that is removed. Raises IndexError
if row is less than zero, or if row + nr is
greater than the current number of table rows.
Remove the nc columns starting at the specified column.
If notify is true, a SEL_DELETED message is sent
to the table's message target for each cell that is removed. Raises
IndexError if column is less than zero, or if column +
nc is greater than the current number of table columns.
Remove item at (row, column). If notify is
true, a SEL_DELETED message is sent to the table's
message target after this cell is removed. Raises IndexError if either
row or column is out of bounds.
Calls block once for each row in the table, passing an array of references
(one element per column) as a parameter.
This method is also aliased as
each
Calls block once for each column in the table, passing an array of
references (one element per row) as a parameter.