AFXTable

This class implements an editable table.


AFXTable(p, numVisRows, numVisColumns, numRows, numColumns, tgt=None, sel=0, opts=AFXTABLE_NORMAL, x=0, y=0, w=0, h=0, pl=4, pr=4, pt=DEFAULT_MARGIN, pb=DEFAULT_MARGIN)

Constructor.

ArgumentTypeDefaultDescription
pFXComposite Parent widget.
numVisRowsInt Number of rows to display.
numVisColumnsInt Number of columns to display.
numRowsInt Total number of rows including leading rows.
numColumnsInt Total number of columns including leading columns.
tgtFXObjectNoneMessage target.
selInt0Message ID.
optsIntAFXTABLE_NORMALOptions and hints.
xInt0X coordinate of the origin.
yInt0Y coordinate of the origin.
wInt0Width of the table widget.
hInt0Height of the table widget.
plInt4Left padding (margin).
prInt4Right padding (margin).
ptIntDEFAULT_MARGINTop padding (margin).
pbIntDEFAULT_MARGINBottom padding (margin).


addList(text, opts=AFXTABLE_LIST_NORMAL)

Adds a list that have only text items to the table and returns the list ID. The text strings of the list items are delimited by tab "\t" characters in the given text. The list is used by items of type LIST.

ArgumentTypeDefaultDescription
textString Tab "\t" delimited text string (e.g. "0\t50\t100\t150").
optsIntAFXTABLE_LIST_NORMALOptions.


addList(opts=AFXTABLE_LIST_NORMAL)

Adds a list to the table and returns the list ID. The list is used by items of type LIST.

ArgumentTypeDefaultDescription
optsIntAFXTABLE_LIST_NORMALList flag.


appendClientPopupItem(text, icon=None, tgt=None, sel=0, alias=None)

Appends a client item to the MB3 popup menu.

ArgumentTypeDefaultDescription
textString Label, accelerator and help string (e.g. "Cu&t\tCtl+X\tCut selection to clipboard.").
iconFXIconNoneIcon to display.
tgtFXObjectNoneMessage target.
selInt0Message ID.
aliasStringNoneItem alias name.


appendListItem(listId, text, icon=None)

Appends an item to the specified table list; returns the index of the new item.

ArgumentTypeDefaultDescription
listIdInt ID of the list to append to.
textString Item's text.
iconFXIconNoneItem's icon.


clearClientPopupItems()

Removes all client items from the MB3 popup menu.


clearContents(startRow, startColumn, endRow, endColumn, clearEditableOnly=TRUE)

Clears the text in the items in the specified range.

ArgumentTypeDefaultDescription
startRowInt Row in which to start clearing.
startColumnInt Column in which to start clearing.
endRowInt Row in which to end clearing.
endColumnInt Column in which to end clearing.
clearEditableOnlyIntTRUESpecify TRUE to clear the text of editable items only.


clearListItems(listId)

Removes all items from the specified table list.

ArgumentTypeDefaultDescription
listIdInt ID of the list to clear.


create()

Creates server-side resources.

Reimplemented from AFXBaseTable.


deleteColumns(startColumn, numColumns=1, notify=FALSE)

Deletes columns starting at the specified column.

ArgumentTypeDefaultDescription
startColumnInt Starting column.
numColumnsInt1Number of columns to delete.
notifyIntFALSESpecify TRUE to notify target of the deletion.


deleteRows(startRow, numRows=1, notify=FALSE)

Deletes rows starting at the specified row.

ArgumentTypeDefaultDescription
startRowInt Starting row.
numRowsInt1Number of rows to delete.
notifyIntFALSESpecify TRUE to notify target of the deletion.


deselectItem(row, column)

Deselects the specified item.

ArgumentTypeDefaultDescription
rowInt  
columnInt Column.


deselectRow(row)

Deselects all items in the row.

ArgumentTypeDefaultDescription
rowInt Row.


destroy()

Destroys server-side resources.

Reimplemented from FXComposite.


detach()

Detaches server-side resources.

Reimplemented from AFXBaseTable.


getColumnAtX(x)

Returns the column at the specified x coordinate; returns -1 if x is outside of the table.

ArgumentTypeDefaultDescription
xInt X coordinate.


getColumnSortOrder(column)

Returns the sort order of the given column.

ArgumentTypeDefaultDescription
columnInt Column index.


getColumnWidth(column)

Returns the width, in pixels, of the specified column.

ArgumentTypeDefaultDescription
columnInt Column.


getCurrentColumn()

Returns the column index of the current item.

Reimplemented from AFXBaseTable.


getCurrentRow()

Returns the row index of the current item.

Reimplemented from AFXBaseTable.


getCurrentSortColumn()

Returns the current sort column or -1 if none.


getDefaultColumnWidth()

Returns the default column width, in pixels, of the table.


getDefaultHeight()

Returns the default height of the table.

Reimplemented from AFXBaseTable.


getDefaultRowHeight()

Returns the default row height, in pixels, of the table.


getDefaultWidth()

Returns the default width of the table.

Reimplemented from AFXBaseTable.


getFont()

Gets the font for all text items in the table.

Reimplemented from AFXBaseTable.


getItemBackColor(row, column)

Gets the background color of an item.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


getItemBoolValue(row, column)

Returns the value of an item of type BOOL.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


getItemColor(row, column)

Returns the color of an item of type COLOR. The color is "As is", "Default", or a color hex specification in the form of "RRGGBB" (e.g., "#0A1B2C").

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


getItemFloatValue(row, column)

Returns the value of an item of type FLOAT.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


getItemIcon(row, column)

Returns the icon of an item of type ICON.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


getItemIntValue(row, column)

Returns the value of an item of type INT.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


getItemListId(row, column)

Returns the list ID of an item of type LIST.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


getItemListIndex(row, column)

Returns the list index (selection) of an item of type LIST.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


getItemProvider()

Returns the item provider of this object.


getItemSelector(row, column)

Returns the message ID for an item.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


getItemTarget(row, column)

Returns the target for an item.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


getItemText(row, column)

Returns the text of an item of type TEXT.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


getItemTextColor(row, column)

Gets the text color of an item.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


getItemType(row, column)

Returns the type of an item.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


getItemValue(row, column)

Returns the text-form value of an item of any type.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


getLeadingColumns()

Returns the number of leading columns in the table.

Reimplemented from AFXBaseTable.


getLeadingFont()

Returns the font of the leading rows and columns.


getLeadingRows()

Returns the number of leading rows in the table.

Reimplemented from AFXBaseTable.


getListItemIcon(listId, index)

Returns the icon of the item at the specified index of the specified table list.

ArgumentTypeDefaultDescription
listIdInt ID of the list.
indexInt Index into the list of the item to return.


getListItemText(listId, index)

Returns the text of the item at the specified index of the specified table list.

ArgumentTypeDefaultDescription
listIdInt ID of the list.
indexInt Index into the list of the item to return.


getNumColumns()

Returns the number of columns in the table (including leading columns).

Reimplemented from AFXBaseTable.


getNumEmptyRowsAtBottom()

Returns the number of empty (non-trailing) rows at the bottom of the table.


getNumListItems(listId)

Returns the number of items in the specified table list.

ArgumentTypeDefaultDescription
listIdInt ID of the list.


getNumRows()

Returns the number of rows in the table (including leading rows).

Reimplemented from AFXBaseTable.


getPopupOptions()

Returns the flags for the menu items to be displayed in the popup menu.


getPreferredRowHeight(row)

Returns the height required for a row (useful for multi-line labels).

ArgumentTypeDefaultDescription
rowInt Row.


getRowAtY(y)

Returns the row at the specified y coordinate; returns -1 if y is outside of the table.

ArgumentTypeDefaultDescription
yInt Y coordinate.


getRowHeight(row)

Returns the height, in pixels, of the specified row.

Reimplemented from AFXBaseTable.

ArgumentTypeDefaultDescription
rowInt  


getSelBackColor()

Gets the selection background color of the table.

Reimplemented from AFXBaseTable.


getSelTextColor()

Gets the selection text color of the table.

Reimplemented from AFXBaseTable.


getStretchableColumn()

Returns the index of the stretchable column.


getTableStyle()

Returns the options related only to the table.


getVisibleColumns()

Gets the number of visible columns in the table.

Reimplemented from AFXBaseTable.


getVisibleRows()

Gets the number of visible rows in the table.

Reimplemented from AFXBaseTable.


insertColumns(startColumn, numColumns=1, notify=FALSE)

Inserts columns at the specified location.

ArgumentTypeDefaultDescription
startColumnInt Starting column.
numColumnsInt1Number of columns to insert.
notifyIntFALSESpecify TRUE to notify target of the insertion.


insertRows(startRow, numRows=1, notify=FALSE)

Inserts rows at the specified location.

ArgumentTypeDefaultDescription
startRowInt Starting row.
numRowsInt1Number of rows to insert.
notifyIntFALSESpecify TRUE to notify target of the insertion.


isAnyItemInColumnSelected(column)

Returns TRUE if any item in the column is selected.

ArgumentTypeDefaultDescription
columnInt Column.


isAnyItemInRowSelected(row)

Returns TRUE if any item in the row is selected.

ArgumentTypeDefaultDescription
rowInt Row.


isColumnSelected(column)

Returns TRUE if all items in the column are selected.

ArgumentTypeDefaultDescription
columnInt Column.


isColumnSortable(column)

Returns TRUE if the items of the given column can be sorted.

ArgumentTypeDefaultDescription
columnInt Column index.


isItemBool(row, column)

Returns TRUE if the specified item is of type BOOL.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


isItemColor(row, column)

Returns TRUE if the specified item is of type COLOR.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


isItemEditable(row, column)

Returns TRUE if the item is editable.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


isItemEmpty(row, column)

Returns TRUE if the specified item does not have a value. This method checks the actual contents of the specified item and does not account for the empty-item policy for the item.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


isItemIcon(row, column)

Returns TRUE if the specified item is of type ICON.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


isItemList(row, column)

Returns TRUE if the specified item is of type LIST.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


isItemSelected(row, column)

Returns TRUE if the specified item is selected.

ArgumentTypeDefaultDescription
rowInt Row.
columnInt Column.


isItemText(row, column)

Returns TRUE if the specified item is of type TEXT.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.


isItemVisible(row, column)

Returns TRUE if the specified item is visible.

ArgumentTypeDefaultDescription
rowInt Row.
columnInt Column.


isRowSelected(row)

Returns TRUE if all items in the row are selected.

ArgumentTypeDefaultDescription
rowInt Row.


killFocus()

Removes the focus from this window.

Reimplemented from AFXBaseTable.


layout()

Lays out the table contents.

Reimplemented from AFXBaseTable.


makePositionVisible(row, column)

Scrolls to make the specified row, column fully visible.

ArgumentTypeDefaultDescription
rowInt Row.
columnInt Column.


makeRowVisible(row)

Scrolls vertically (only) to make the specified row fully visible.

ArgumentTypeDefaultDescription
rowInt Row.


moveContents(x, y)

Scrolls the contents.

ArgumentTypeDefaultDescription
xInt Distance scrolled in X direction.
yInt Distance scrolled in Y direction.


recalc()

Propagates size changes.

Reimplemented from AFXBaseTable.


removeListItem(listId, index)

Removes the item at the specified index from the specified table list; returns the number of items remaining in list.

ArgumentTypeDefaultDescription
listIdInt ID of the list to remove from.
indexInt Index of the list item to remove.


selectItem(row, column)

Selects the specified item.

ArgumentTypeDefaultDescription
rowInt  
columnInt Column.


selectRow(row)

Selects all items in the row.

ArgumentTypeDefaultDescription
rowInt Row.


setColumnBoolIcons(column, trueIcon=None, falseIcon=None)

Sets the TRUE and FALSE icons of all existing and future items in a column of type BOOL. Specifying -1 for the column will change all columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
trueIconFXIconNoneIcon displayed when value is TRUE; 0 = default icon.
falseIconFXIconNoneIcon displayed when value is FALSE; 0 = default icon.


setColumnBoolValue(column, value)

Sets the value of all existing and future items in a column of type BOOL. Specifying -1 for the column will change all columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
valueInt Specify TRUE or FALSE.


setColumnColor(column, color)

Sets the color of all existing and future items in a column of type COLOR. The color can be "As is", "Default", a color hex specification in the form of "RRGGBB" (e.g., "#0A1B2C"), or a pre-defined color name (e.g., "Red"). Specifying -1 for the column will change all columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
colorString Color.


setColumnColorItemDefault(column, color)

Sets the color of the color item in the flyout menu for all existing and future items that display "As is" or "Default" in a column of type COLOR. The color is either a color hex specification in the form of "RRGGBB" (e.g., "#0A1B2C") or a pre-defined color name (e.g., "Red"). Specifying -1 for the column will change all columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
colorString Color.


setColumnColorOptions(column, opts)

Sets the color flyout options for all existing and future items in a column of type COLOR. Specifying -1 for the column will change all columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
optsInt Options (see ColorFlyoutOptions).


setColumnEditable(column, editable)

Sets the editability of all existing and future items in a column. Specifying -1 for the column will change all columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
editableInt Specify TRUE for editable, FALSE for read-only.


setColumnFloatValue(column, value)

Sets the value of all existing and future items in a column of type FLOAT. Specifying -1 for the column will change all columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
valueFloat Floating-point value.


setColumnIcon(column, icon=None)

Sets the icon of all existing and future items in a column of type ICON.

ArgumentTypeDefaultDescription
columnInt Column index.
iconFXIconNoneIcon.


setColumnIntValue(column, value)

Sets the value of all existing and future items in a column of type INT. Specifying -1 for the column will change all columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
valueInt Integer value.


setColumnJustify(column, justify)

Sets the justification of all existing and future items in a column. Specifying -1 for the column will change all columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
justifyInt Justification (see ItemJustify).


setColumnListId(column, listId)

Sets the list ID of all existing and future items in a column of type LIST. Specifying -1 for the column will change all columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
listIdInt List ID.


setColumnListIndex(column, index)

Sets the list index (selection) of all existing and future items in a column of type LIST. Specifying -1 for the column will change all columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
indexInt Index of item to be selected.


setColumnSortable(column, sortable)

Sets a column to be sortable or not. Specifying -1 for the column will change all columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
sortableInt Specify TRUE for sortable, FALSE for otherwise.


setColumnSortOrder(column, order)

Sets the sort order of the given column. Specifying -1 for the column will change all columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
orderInt Sort order (see SortOrder).


setColumnText(column, text)

Sets the text of all existing and future items in a column of type TEXT. Specifying -1 for the column will change all columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
textString Text.


setColumnType(column, type)

Sets the type of a column. Specifying -1 for the column will change all columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
typeInt Type (see Flags for item types).


setColumnWidth(column, width)

Sets the width, in pixels, of the specified column. Specifying -1 for the column will change all non-leading and non-trailing columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
widthInt Width in pixels.


setColumnWidthInChars(column, numChars)

Sets the width, in number of characters, of the specified column. Specifying -1 for the column will change all non-leading and non-trailing columns in the table and set the default for the table.

ArgumentTypeDefaultDescription
columnInt Column index.
numCharsInt Width in number of characters.


setCurrentSortColumn(column)

Sets the current sort column. The given column must be sortable; otherwise the current sort column will not change.

ArgumentTypeDefaultDescription
columnInt Column index.


setDefaultBoolIcons(trueIcon=None, falseIcon=None)

Sets the default TRUE and FALSE icons for the table (0 = default icon).

ArgumentTypeDefaultDescription
trueIconFXIconNoneIcon displayed when value is TRUE; 0 = default icon.
falseIconFXIconNoneIcon displayed when value is FALSE; 0 = default icon.


setDefaultBoolValue(value)

Sets the default bool value for the table.

ArgumentTypeDefaultDescription
valueInt Specify TRUE or FALSE.


setDefaultColor(color)

Sets the default color for all items of type COLOR in the table. The color can be "As is", "Default", a color hex specification in the form of "RRGGBB" (e.g., "#0A1B2C"), or a pre-defined color name (e.g., "Red").

ArgumentTypeDefaultDescription
colorString Color.


setDefaultColumnWidth(width)

Sets the default width, in pixels, for all columns.

Reimplemented from AFXBaseTable.

ArgumentTypeDefaultDescription
widthInt  


setDefaultFloatValue(value)

Sets the default floating-point value for the table.

ArgumentTypeDefaultDescription
valueFloat Floating-point value.


setDefaultIntValue(value)

Sets the default integer value for the table.

ArgumentTypeDefaultDescription
valueInt Integer value.


setDefaultJustify(justify)

Sets the default justification for the table.

ArgumentTypeDefaultDescription
justifyInt Justification (see ItemJustify).


setDefaultRowHeight(height)

Sets the default height, in pixels, for all rows.

Reimplemented from AFXBaseTable.

ArgumentTypeDefaultDescription
heightInt  


setDefaultText(text)

Sets the default text for the table.

ArgumentTypeDefaultDescription
textString Text.


setDefaultType(type)

Sets the default type for the table.

ArgumentTypeDefaultDescription
typeInt Type (see Flags for item types).


setEmptyItemDefault(defaultVal)

Sets the default value (in text form) used for empty items of the table if its empty-item policy includes DEFAULT_IF_EMPTY.

ArgumentTypeDefaultDescription
defaultValString Default value in text form.


setEmptyItemPolicy(policy)

Sets the policy for handling empty items of the table (see EmptyItemPolicy).

ArgumentTypeDefaultDescription
policyInt Flags for handling empty items (see EmptyItemPolicy).


setFont(font)

Sets the font for all text items in the table.

ArgumentTypeDefaultDescription
fontFXFont Font.


setItemBackColor(row, column, color)

Sets the background color of an item using an FXColor.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
colorFXColor Color index.


setItemBackColor(row, column, color)

Sets the background color of an item using a string.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
colorString Color name.


setItemBoolIcons(row, column, trueIcon=None, falseIcon=None)

Sets the TRUE and FALSE icons of an item of type BOOL.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
trueIconFXIconNoneIcon displayed when value is TRUE; 0 = default icon.
falseIconFXIconNoneIcon displayed when value is FALSE; 0 = default icon.


setItemBoolValue(row, column, value)

Sets the value of an item of type BOOL.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
valueInt Specify TRUE or FALSE.


setItemColor(row, column, color)

Sets the color of an item of type COLOR. The color can be "As is", "Default", a color hex specification in the form of "RRGGBB" (e.g., "#0A1B2C"), or a pre-defined color name (e.g., "Red").

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
colorString Color.


setItemEditable(row, column, editable)

Sets the editability of an item.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
editableInt Specify TRUE for editable, FALSE for read-only.


setItemFloatValue(row, column, value)

Sets the value of an item of type FLOAT.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
valueFloat Floating-point value.


setItemIcon(row, column, icon=None)

Sets the icon of an item of type ICON.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
iconFXIconNoneIcon.


setItemIntValue(row, column, value)

Sets the value of an item of type INT.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
valueInt Integer value.


setItemJustify(row, column, justify)

Sets the justification of an item.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
justifyInt Justification (see ItemJustify).


setItemListId(row, column, listId)

Sets the list ID of an item of type LIST.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
listIdInt List ID.


setItemListIndex(row, column, index)

Sets the list index (selection) of an item of type LIST.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
indexInt Index of item to be selected.


setItemProvider(ip)

Sets the item provider of this object.

ArgumentTypeDefaultDescription
ipFXObject Item provideer.


setItemSpan(row, column, numRows, numColumns)

Sets a leading item to span more than one row or column.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
numRowsInt Number of rows to span.
numColumnsInt Number of columns to span.


setItemTarget(row, column, tgt, msg=0)

Sets the target and message ID for an item.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
tgtFXObject Target.
msgInt0Message ID.


setItemText(row, column, text)

Sets the text of an item of type TEXT.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
textString Text.


setItemTextColor(row, column, color)

Sets the text color of an item using an FXColor.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
colorFXColor Color index.


setItemTextColor(row, column, color)

Sets the text color of an item using a string.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
colorString Color name.


setItemType(row, column, type)

Sets the type of an item.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
typeInt Type (see Flags for item types).


setItemValue(row, column, valueText)

Sets the value of an item of any type that can interpret a text string for its value. Returns TRUE if the value of the specified item is set successfully.

ArgumentTypeDefaultDescription
rowInt Row index of item.
columnInt Column index of item.
valueTextString Text-form value of item.


setLeadingColumnLabels(str, column=0)

Set the labels of a leading column. Note: this API must be used to set the header column labels, otherwise labels will be overwritten by auto-numbering.

ArgumentTypeDefaultDescription
strString Tab "\t" delimited list, can also contain newline characters indicating that label contains multiple lines of text (e.g. "Young's\nModulus\tPoisson's\nRatio").
columnInt0Column, this column must have previously been specified as a leading column (see setLeadingColumns).


setLeadingColumns(numColumns)

Sets the number of leading columns.

ArgumentTypeDefaultDescription
numColumnsInt Number of columns.


setLeadingFont(font)

Sets the font of the leading rows and columns.

ArgumentTypeDefaultDescription
fontFXFont Font.


setLeadingRowLabels(str, row=0)

Set the labels of a leading row. Note: this API must be used to set the header row labels, otherwise labels will be overwritten by auto-numbering.

ArgumentTypeDefaultDescription
strString Tab "\t" delimited list, can also contain newline characters indicating that label contains multiple lines of text (e.g. "Young's\nModulus\tPoisson's\nRatio").
rowInt0Row, this row must have previously been specified as a leading row (see setLeadingRows).


setLeadingRows(numRows)

Sets the number of leading rows.

ArgumentTypeDefaultDescription
numRowsInt Number of rows.


setListMaxVisible(maxVisible)

Sets the maximum number of visible items for all table lists.

ArgumentTypeDefaultDescription
maxVisibleInt Maximum number of visible items.


setPopupOptions(opts)

Sets the menu items to be displayed in the popup menu.

ArgumentTypeDefaultDescription
optsInt Options.


setRowHeight(row, height)

Sets the height, in pixels, of the specified row.

Reimplemented from AFXBaseTable.

ArgumentTypeDefaultDescription
rowInt  
heightInt  


setSelBackColor(color)

Sets the selection background color of the table.

ArgumentTypeDefaultDescription
colorFXColor Color.


setSelTextColor(color)

Sets the selection text color of the table.

ArgumentTypeDefaultDescription
colorFXColor Color.


setStretchableColumn(column)

Sets the stretchable column. (This method only works for the last column.)

ArgumentTypeDefaultDescription
columnInt Column index.


setTableSize(numRows, numColumns, notify=FALSE)

Sets the size of the table.

ArgumentTypeDefaultDescription
numRowsInt Number of rows.
numColumnsInt Number of columns.
notifyIntFALSESpecify TRUE to notify target of change.


setTableStyle(style)

Sets the table options.

ArgumentTypeDefaultDescription
styleInt Style flag (see Flags for AFX table options).


setVisibleColumns(visibleColumns)

Sets the number of visible columns in the table.

ArgumentTypeDefaultDescription
visibleColumnsInt Number of visible columns.


setVisibleRows(visibleRows)

Sets the number of visible rows in the table.

ArgumentTypeDefaultDescription
visibleRowsInt Number of visible rows.


shadeReadOnlyItems(shadeItems)

Makes the table to use a different, typically shaded, background color for read-only items if TRUE is passed to the method. The table would use the same regular background color for both editable and read-only items if FALSE is passed to the method.

ArgumentTypeDefaultDescription
shadeItemsInt Specify TRUE to use a different background color for read-only items.


showHorizontalGrid(on=TRUE)

Controls the display of horizontal grid lines in the table.

Reimplemented from AFXBaseTable.

ArgumentTypeDefaultDescription
onIntTRUE 


showVerticalGrid(on=TRUE)

Controls the display of vertical grid lines in the table.

Reimplemented from AFXBaseTable.

ArgumentTypeDefaultDescription
onIntTRUE 


Class flags

Flags for popup menu items.

POPUP_NONE

Popup not displayed.

POPUP_UNDO

Not yet supported. (Display "Undo" menu item).

POPUP_REDO

Not yet supported. (Display "Redo" menu item).

POPUP_CUT

Display "Cut" menu item.

POPUP_COPY

Display "Copy" menu item.

POPUP_PASTE

Display "Paste" menu item.

POPUP_EDIT

Convenience flag for specifying multiple menu items.

POPUP_INSERT_ROW

Display "Insert Row Before/After" menu items.

POPUP_INSERT_COLUMN

Display "Insert Column Before/After" menu items.

POPUP_DELETE_ROW

Display "Delete Rows" menu item.

POPUP_DELETE_COLUMN

Display "Delete Columns" menu item.

POPUP_CLEAR_CONTENTS

Display "Clear Contents" and "Clear Table" menu items.

POPUP_MODIFY_ROW

Convenience flag for specifying multiple menu items.

POPUP_MODIFY_COLUMN

Convenience flag for specifying multiple menu items.

POPUP_MODIFY

Convenience flag for specifying multiple menu items.

POPUP_READ_FROM_FILE

Display "Read from File" menu item.

POPUP_WRITE_TO_FILE

Display "Write to File" menu item.

POPUP_FILE

Display "Read from file" and "Write to file" menu items.

POPUP_ALL

Display all menu items.

Message ID's.

ID_CUT_SEL

ID for the Cut button.

ID_COPY_SEL

ID for the Copy button.

ID_PASTE_SEL

ID for the Paste button.

ID_ADD_COLUMN

ID for the Insert Column buttons.

ID_ADD_ROW

ID for the Insert Row buttons.

ID_DELETE_COLUMNS

ID for the Delete Columns button.

ID_DELETE_ROWS

ID for the Delete Rows button.

ID_CLEAR_SEL

ID for the Clear Contents button.

ID_CLEAR_TABLE

ID for the Clear Table button.

ID_READ_SEL

ID for the Read from File button.

ID_FORMAT_SEL

Not yet implemented. (ID for the Format button.).

ID_WRITE

ID for the Write to File button.

ID_FILE_DB

ID for the Read from File button.

ID_WRITE_FILE_DB

ID for the file selection dialog used by the Write to File button.

ID_CONFIRM_WRITE

ID for OK to overwrite? warning dialog.

Flags for undo (not yet implemented).

MAXUNDOSIZE

Don't let the undo buffer get out of hand.

KEEPUNDOSIZE

When MAXUNDOSIZE was exceeded, trim down to this size.

Flags for color flyouts (used for items of type COLOR).

COLOR_INCLUDE_COLOR_ONLY

Color item has no As Is and Default in its flyout.

COLOR_INCLUDE_AS_IS

Color item has As Is in its flyout.

COLOR_INCLUDE_DEFAULT

Color item has Default in its flyout.

COLOR_INCLUDE_ALL

Color item has both As Is and Default in its flyout. This is the default option.

Flags for how empty items should be handled by the AFXTable value-retrieving and error-checking API's

DISALLOW_EMPTY

Disallow an item to be empty (default).

ALLOW_EMPTY

Allow an item to be empty.

DEFAULT_IF_EMPTY

Allow an item to be empty and use its default value for the item.

IGNORE_BOTTOM_EMPTY_ROWS

Exclude empty rows at the bottom of the table (default).

KEEP_BOTTOM_EMPTY_ROWS

Include empty rows at the bottom of the table.

Flags for item alignment.

REAL

Not yet implemented (Real).

LEFT

Left justified.

RIGHT

Right justified.

CENTER

Center justified (horizontal).

TOP

Top justified.

BOTTOM

Bottom justified.

MIDDLE

Middle justified (vertical).

Flags for item types.

TEXT

Item accepts a text string via a text field.

FLOAT

Item accepts a floating-point number via a text field.

INT

Item accepts an integer via a text field.

LIST

Item accepts input from a list.

BOOL

Item is a boolean; displayed as an icon.

ICON

Item displays an icon and does not accept input.

COLOR

Item accepts color selection via a color flyout.

Flags for real formats.

GENERAL

General.

SCIENTIFIC

Scientific.

AUTOMATIC

Automatic.

Flags for sorting items in a column.

SORT_INACTIVE

Sort currently not active for the column.

SORT_ASCENDING

Sort items of the column in the ascending order.

SORT_DESCENDING

Sort items of the column in the descending order.


Global flags

Flags for AFX table options.

AFXTABLE_COLUMN_RESIZABLE

Allow users to resize columns.

AFXTABLE_ROW_RESIZABLE

Allow users to resize rows.

AFXTABLE_RESIZE

Allow users to resize rows and columns.

AFXTABLE_NO_COLUMN_SELECT

Disallow column selections (selecting a header/footer item in a column selects the whole column).

AFXTABLE_NO_ROW_SELECT

Disallow row selections (selecting a header/footer item in a row selects the whole row).

AFXTABLE_ROW_MODE

Selecting any item in a row selects the whole row.

AFXTABLE_EXTENDED_SELECT

Use extended selection mode that allows multiple items to be selected and allows users to drag-select a range of items.

AFXTABLE_SINGLE_SELECT

Use single selection mode that allows up to one item to be selected.

AFXTABLE_BROWSE_SELECT

Use browse selection mode that enforces one single item to be selected at all times.

AFXTABLE_EDITABLE

Table is editable.

AFXTABLE_NORMAL

Default table options--use extended selection mode, columns are resizable, and layout fills both X and Y directions.

Flags for the table's list (for items of type LIST).

AFXTABLE_LIST_PRESELECT_NONE

Do not pre-select any list item.