Class: Fox::FXTable
- Inherits:
-
FXScrollArea
- Object
- FXObject
- FXId
- FXDrawable
- FXWindow
- FXComposite
- FXScrollArea
- Fox::FXTable
- Includes:
- Enumerable
- Defined in:
- rdoc-sources/FXTable.rb,
lib/fox16/core.rb,
lib/fox16/iterators.rb
Overview
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 |
Instance Attribute Summary (collapse)
-
- (Object) anchorColumn
readonly
Column number for anchor cell [Integer].
-
- (Object) anchorRow
readonly
Row number for anchor cell [Integer].
-
- (Object) baseColor
Base GUI color FXColor.
-
- (Object) borderColor
Border color FXColor.
-
- (Object) cellBorderColor
Cell border color FXColor.
-
- (Object) cellBorderWidth
Cell border width, in pixels [Integer].
-
- (Object) columnHeader
readonly
Column header control FXHeader.
-
- (Object) columnHeaderFont
Column header font FXFont.
-
- (Object) columnHeaderHeight
The fixed column header height, if columnHeaderMode is LAYOUT_FIX_HEIGHT.
-
- (Object) columnHeaderMode
The column header height mode is either fixed (LAYOUT_FIX_HEIGHT) or variable.
-
- (Object) cornerButton
readonly
Button in the upper left corner FXButton.
-
- (Object) currentColumn
readonly
Column number for current cell [Integer].
-
- (Object) currentRow
readonly
Row number for current cell [Integer].
-
- (Object) defColumnWidth
Default column width, in pixels [Integer].
-
- (Object) defRowHeight
Default row height, in pixels [Integer].
-
- (Object) font
Text font FXFont.
-
- (Object) gridColor
Grid color FXColor.
-
- (Object) helpText
Status line help text [String].
-
- (Object) hiliteColor
Highlight color FXColor.
-
- (Object) marginBottom
Bottom cell margin, in pixels [Integer].
-
- (Object) marginLeft
Left cell margin, in pixels [Integer].
-
- (Object) marginRight
Right cell margin, in pixels [Integer].
-
- (Object) marginTop
Top cell margin, in pixels [Integer].
-
- (Object) numColumns
readonly
Number of columns [Integer].
-
- (Object) numRows
readonly
Number of rows [Integer].
-
- (Object) rowHeader
readonly
Row header control FXHeader.
-
- (Object) rowHeaderFont
Row header font FXFont.
-
- (Object) rowHeaderMode
The row header width mode is either fixed (LAYOUT_FIX_WIDTH) or variable.
-
- (Object) rowHeaderWidth
The fixed row header width, if rowHeaderMode is LAYOUT_FIX_WIDTH.
-
- (Object) selBackColor
Background color for selected cell(s) FXColor.
-
- (Object) selEndColumn
readonly
Ending column number for selection, or -1 if there is no selection [Integer].
-
- (Object) selEndRow
readonly
Ending row number for selection, or -1 if there is no selection [Integer].
-
- (Object) selStartColumn
readonly
Starting column number for selection, or -1 if there is no selection [Integer].
-
- (Object) selStartRow
readonly
Starting row number for selection, or -1 if there is no selection [Integer].
-
- (Object) selTextColor
Text color for selected cell(s) FXColor.
-
- (Object) shadowColor
Shadow color FXColor.
-
- (Object) stippleColor
Stipple color FXColor.
-
- (Object) tableStyle
Table style [Integer].
-
- (Object) textColor
Text color FXColor.
-
- (Object) visibleColumns
Number of visible columns [Integer].
-
- (Object) visibleRows
Number of visible rows [Integer].
Attributes inherited from FXScrollArea
#contentHeight, #contentWidth, #horizontalScrollBar, #scrollStyle, #verticalScrollBar, #viewportHeight, #viewportWidth, #xPosition, #yPosition
Attributes inherited from FXWindow
#accelTable, #backColor, #defaultCursor, #dragCursor, #focus, #key, #last, #layoutHints, #next, #numChildren, #owner, #parent, #prev, #root, #selector, #shell, #target, #x, #y
Attributes inherited from FXDrawable
Attributes inherited from FXId
Class Method Summary (collapse)
-
+ (Object) csvType
Returns the drag type for CSV data.
-
+ (Object) csvTypeName
Returns the drag type name for CSV data.
Instance Method Summary (collapse)
-
- (Object) acceptInput(notify = false)
End input mode and accept the new value from the control.
-
- (Boolean) anythingSelected?
Return true if any cells are selected.
-
- (Object) appendColumns(numColumns = 1, notify = false)
Append numColumns columns to the right of the table..
-
- (Object) appendRows(numRows = 1, notify = false)
Append numRows rows to the bottom of the table..
-
- (Object) cancelInput
Cancel input mode.
-
- (Object) clearItems(notify = false)
Remove all items from table.
-
- (Object) colAtX(x)
Determine column containing x.
-
- (Object) columnRenumbering=(renumber)
Set column renumbering to true or false.
-
- (Boolean) columnRenumbering?
Get column renumbering.
-
- (Boolean) columnSelected?(c)
Return true if the specified column of cells is selected.
-
- (Object) countText(text, cs = "\t,", rs = "\n")
Determine the number of rows and columns in a block of text where columns are separated by characters from the set cs, and rows are separated by characters from the set rs.
-
- (Object) createItem(text, icon, data)
Create a new table item.
-
- (Object) disableItem(row, column)
Disable cell.
-
- (Object) drawCell(dc, xlo, xhi, ylo, yhi, xoff, yoff, startRow, endRow, startCol, endCol)
Draw a table cell.
-
- (Object) drawRange(dc, xlo, xhi, ylo, yhi, xoff, yoff, rlo, rhi, clo, chi)
Draw a range of cells.
-
- (Object) each_column
Calls block once for each column in the table, passing an array of references (one element per row) as a parameter.
-
- (Object) each_row
(also: #each)
Calls block once for each row in the table, passing an array of references (one element per column) as a parameter.
-
- (Object) editable=(edit)
Set editability of this table to true or false.
-
- (Boolean) editable?
Return true if this table is editable.
-
- (Object) enableItem(row, column)
Enable cell.
-
- (Object) extendSelection(row, column, notify = false)
Extend selection.
-
- (Object) extractItem(r, c, notify = false)
Extract item from table and return a reference to it.
-
- (Object) extractText(startrow, endrow, startcol, endcol, cs = "\t", rs = "\n")
Extract the text from all the cells in the specified range and return the result as a string.
-
- (Object) first
Override Enumerable#first with FXWindow#first for backwards compatibility.
-
- (Object) fitColumnsToContents(col, nc = 1)
Fit column widths to contents, for the nc columns beginning with column index col.
-
- (Object) fitRowsToContents(row, nr = 1)
Fit row heights to contents, for the nr rows beginning with row index row.
-
- (Object) getCellColor(row, column)
Obtain cell background color.
-
- (Object) getColumnIcon(index)
Return icon of column header at index.
-
- (Object) getColumnIconPosition(index)
Return icon position of column header at index.
-
- (Object) getColumnJustify(index)
Return justify of column header at index.
-
- (Object) getColumnText(index)
Return text of column header at index.
-
- (Object) getColumnWidth(column)
Get column width.
-
- (Object) getColumnX(column)
Get x-coordinate of column.
-
- (Object) getItem(row, column)
Return the item (a reference to an FXTableItem) at the given row and column.
-
- (Object) getItemBorders(r, c)
Return the border style for the cell at (r, c).
-
- (Object) getItemData(row, column)
Return cell user data.
-
- (Object) getItemIcon(row, column)
Return item icon.
-
- (Object) getItemIconPosition(r, c)
Return the relative position of the icon and text for the cell at (r, c).
-
- (Object) getItemJustify(r, c)
Return item justification for the cell at (r, c).
-
- (Object) getItemStipple(r, c)
Return the background stipple style for the cell at (r, c).
-
- (Object) getItemText(row, column)
Return cell text for item at specified row and column.
-
- (Object) getRowHeight(row)
Get row height.
-
- (Object) getRowIcon(index)
Return icon of row header at index.
-
- (Object) getRowIconPosition(index)
Return icon position of row header at index.
-
- (Object) getRowJustify(index)
Return justify of row header at index.
-
- (Object) getRowText(index)
Return text of row header at index.
-
- (Object) getRowY(row)
Get y-coordinate of row.
-
- (Object) horizontalGridShown=(vis)
Set visibility of horizontal grid to true or false.
-
- (Boolean) horizontalGridShown?
Return true if horizontal grid is shown.
-
- (FXTable) initialize(p, target = nil, selector = 0, opts = 0, x = 0, y = 0, width = 0, height = 0, padLeft = DEFAULT_MARGIN, padRight = DEFAULT_MARGIN, padTop = DEFAULT_MARGIN, padBottom = DEFAULT_MARGIN)
constructor
Construct a new FXTable instance.
-
- (Object) insertColumns(column, numColumns = 1, notify = false)
Insert numColumns columns beginning at the specified column number.
-
- (Object) insertRows(row, numRows = 1, notify = false)
Insert numRows rows beginning at the specified row number.
-
- (Boolean) itemCurrent?(row, column)
Returns true if the cell at position (row, column) is the current cell.
-
- (Boolean) itemEnabled?(row, column)
Returns true if the cell at position (row, column) is enabled.
-
- (Boolean) itemSelected?(row, column)
Returns true if the cell at position (row, column) is selected.
-
- (Boolean) itemSpanning?(r, c)
Return true if the cell at position (r, c) is a spanning cell.
-
- (Boolean) itemVisible?(row, column)
Returns true if the cell at position (row, column) is visible.
-
- (Object) killSelection(notify = false)
Kill selection.
-
- (Object) makePositionVisible(row, column)
Scroll to make cell at (row, column) fully visible.
-
- (Object) minColumnWidth(c)
Return minimum column width for column c.
-
- (Object) minRowHeight(r)
Return minimum row height for row r.
-
- (Object) overlayText(startrow, endrow, startcol, endcol, text, cs = "\t", rs = "\n", notify = false)
Overlay the text for the cells in the specified range with the fields specified in text.
-
- (Object) removeColumns(column, nc = 1, notify = false)
Remove the nc columns starting at the specified column.
-
- (Object) removeItem(row, col, notify = false)
Remove item at (row, col), replacing it with nil.
-
- (Object) removeRange(startrow, endrow, startcol, endcol, notify = false)
Remove all cells in the specified range of rows and columns.
-
- (Object) removeRows(row, nr = 1, notify = false)
Remove the nr rows starting at the specified row.
-
- (Object) rowAtY(y)
Determine row containing y.
-
- (Object) rowRenumbering=(renumber)
Set row renumbering to true or false.
-
- (Boolean) rowRenumbering?
Get row renumbering.
-
- (Boolean) rowSelected?(r)
Return true if the specified row of cells is selected.
-
- (Object) selectColumn(col, notify = false)
Select a column of cells.
-
- (Object) selectItem(row, col, notify = false)
Select cell at (row, col).
-
- (Object) selectRange(startRow, endRow, startColumn, endColumn, notify = false)
Select range.
-
- (Object) selectRow(row, notify = false)
Select a row of cells.
-
- (Object) setAnchorItem(row, column)
Change anchored cell.
-
- (Object) setCellColor(row, column, color)
Change cell background color.
-
- (Object) setColumnIcon(index, icon)
Change column header icon.
-
- (Object) setColumnIconPosition(index, mode)
Change column header icon position, e.g.
-
- (Object) setColumnJustify(index, justify)
Change column header justify, e.g.
-
- (Object) setColumnText(index, text)
Set column header at index to text.
-
- (Object) setColumnWidth(column, columnWidth)
Set column width.
-
- (Object) setCurrentItem(row, column, notify = false)
Change current cell.
-
- (Object) setItem(row, column, item)
Replace the item at the given row and column with a (possibly subclassed) item.
-
- (Object) setItemBorders(r, c, borders)
Change item borders style for the item at (r, c).
-
- (Object) setItemData(row, column, data)
Modify cell user data.
-
- (Object) setItemIcon(row, col, icon, notify = false)
Modify cell icon, deleting the old icon if it was owned.
-
- (Object) setItemIconPosition(r, c, mode)
Change relative position of icon and text of item at (r, c).
-
- (Object) setItemJustify(r, c, justify)
Change item justification for the cell at (r, c).
-
- (Object) setItemStipple(r, c, pat)
Set the background stipple style for the cell at (r, c).
-
- (Object) setItemText(row, col, text, notify = false)
Modify cell text for item at specified row and col.
-
- (Object) setRowHeight(row, rowHeight)
Set row height.
-
- (Object) setRowIcon(index, icon)
Change row header icon.
-
- (Object) setRowIconPosition(index, mode)
Change row header icon position, e.g.
-
- (Object) setRowJustify(index, justify)
Change row header justify, e.g.
-
- (Object) setRowText(index, text)
Set row header at index to text.
-
- (Object) setTableSize(numRows, numCols, notify = false)
Resize the table content to numRows rows and numCols columns.
-
- (Object) showHorzGrid(on = true)
Show or hide horizontal grid.
-
- (Object) showVertGrid(on = true)
Show or hide vertical grid.
-
- (Object) startInput(row, col)
Start input mode for the cell at the given position.
-
- (Object) updateItem(row, column)
Repaint cell.
-
- (Object) updateRange(startRow, endRow, startCol, endCol)
Repaint cells between grid lines (startRow, endRow) and grid lines (startCol, endCol).
-
- (Object) verticalGridShown=(vis)
Set visibility of vertical grid to true or false.
-
- (Boolean) verticalGridShown?
Is vertical grid shown?.
Methods inherited from FXScrollArea
#horizontalScrollable?, #position, #scrollCorner, #setPosition, #verticalScrollable?
Methods inherited from FXComposite
#maxChildHeight, #maxChildWidth
Methods inherited from FXWindow
#acceptDrop, #acquireClipboard, #acquireSelection, #active?, #addHotKey, #after?, after?, #before?, before?, #beginDrag, #canFocus?, #changeFocus, #childAtIndex, #childOf?, #children, #clearDragRectangle, #clearShape, colorType, colorTypeName, commonAncestor, #composeContext, #composite?, #contains?, #containsChild?, #create, #createComposeContext, #cursorPosition, #default?, #defaultHeight, #defaultWidth, deleteType, deleteTypeName, #destroy, #destroyComposeContext, #detach, #didAccept, #disable, #doesSaveUnder?, #dragging?, #dropDisable, #dropEnable, #dropEnabled?, #dropFinished, #dropTarget?, #each_child, #each_child_recursive, #enable, #enabled?, #endDrag, #forceRefresh, #getChildAt, #getDNDData, #getHeightForWidth, #getWidthForHeight, #grab, #grabKeyboard, #grabbed?, #grabbedKeyboard?, #handleDrag, #hasClipboard?, #hasFocus?, #hasSelection?, #height, #height=, #hide, imageType, #inFocusChain?, #indexOfChild, #initial?, #inquireDNDAction, #inquireDNDTypes, #killFocus, #layout, #linkAfter, #linkBefore, #lower, #move, octetType, octetTypeName, #offeredDNDType?, #position, #raiseWindow, #recalc, #releaseClipboard, #releaseSelection, #remHotKey, #removeChild, #repaint, #reparent, #resize, #scroll, #setCursorPosition, #setDNDData, #setDefault, #setDragRectangle, #setFocus, #setInitial, #setShape, #shell?, #show, #shown?, stringType, textType, textTypeName, #tr, #translateCoordinatesFrom, #translateCoordinatesTo, #underCursor?, #ungrab, #ungrabKeyboard, #update, urilistType, urilistTypeName, utf16Type, utf16TypeName, utf8Type, utf8TypeName, #visible=, #width, #width=
Methods included from Responder2
Methods inherited from FXDrawable
Methods inherited from FXId
#create, #created?, #destroy, #detach
Methods inherited from FXObject
#bind, #handle, #load, #save, subclasses
Constructor Details
- (FXTable) initialize(p, target = nil, selector = 0, opts = 0, x = 0, y = 0, width = 0, height = 0, padLeft = DEFAULT_MARGIN, padRight = DEFAULT_MARGIN, padTop = DEFAULT_MARGIN, padBottom = DEFAULT_MARGIN)
Construct a new FXTable instance. The table is initially empty, and reports a default size based on the scroll areas's scrollbar placement policy.
Parameters:
p |
the parent window for this table Fox::FXComposite |
target |
the message target (if any) for this table Fox::FXObject |
selector |
the message identifier for this table [Integer] |
opts |
table options [Integer] |
x |
initial x-position [Integer] |
y |
initial y-position [Integer] |
width |
initial width [Integer] |
height |
initial height [Integer] |
padLeft |
internal padding on the left side, in pixels [Integer] |
padRight |
internal padding on the right side, in pixels [Integer] |
padTop |
internal padding on the top side, in pixels [Integer] |
padBottom |
internal padding on the bottom side, in pixels [Integer] |
419 420 |
# File 'rdoc-sources/FXTable.rb', line 419 def initialize(p, target=nil, selector=0, opts=0, x=0, y=0, width=0, height=0, padLeft=DEFAULT_MARGIN, padRight=DEFAULT_MARGIN, padTop=DEFAULT_MARGIN, padBottom=DEFAULT_MARGIN) # :yields: theTable end |
Instance Attribute Details
- (Object) anchorColumn (readonly)
Column number for anchor cell [Integer]
340 341 342 |
# File 'rdoc-sources/FXTable.rb', line 340 def anchorColumn @anchorColumn end |
- (Object) anchorRow (readonly)
Row number for anchor cell [Integer]
337 338 339 |
# File 'rdoc-sources/FXTable.rb', line 337 def anchorRow @anchorRow end |
- (Object) baseColor
Base GUI color Fox::FXColor
361 362 363 |
# File 'rdoc-sources/FXTable.rb', line 361 def baseColor @baseColor end |
- (Object) borderColor
Border color Fox::FXColor
370 371 372 |
# File 'rdoc-sources/FXTable.rb', line 370 def borderColor @borderColor end |
- (Object) cellBorderColor
Cell border color Fox::FXColor
385 386 387 |
# File 'rdoc-sources/FXTable.rb', line 385 def cellBorderColor @cellBorderColor end |
- (Object) cellBorderWidth
Cell border width, in pixels [Integer]
388 389 390 |
# File 'rdoc-sources/FXTable.rb', line 388 def cellBorderWidth @cellBorderWidth end |
- (Object) columnHeader (readonly)
Column header control Fox::FXHeader
268 269 270 |
# File 'rdoc-sources/FXTable.rb', line 268 def columnHeader @columnHeader end |
- (Object) columnHeaderFont
Column header font Fox::FXFont
316 317 318 |
# File 'rdoc-sources/FXTable.rb', line 316 def columnHeaderFont @columnHeaderFont end |
- (Object) columnHeaderHeight
The fixed column header height, if columnHeaderMode is LAYOUT_FIX_HEIGHT.
319 320 321 |
# File 'rdoc-sources/FXTable.rb', line 319 def columnHeaderHeight @columnHeaderHeight end |
- (Object) columnHeaderMode
The column header height mode is either fixed (LAYOUT_FIX_HEIGHT) or variable. In variable height mode, the column header will size to fit the contents in it. In fixed height mode, the size is explicitly set via the columnHeaderHeight attribute.
304 305 306 |
# File 'rdoc-sources/FXTable.rb', line 304 def columnHeaderMode @columnHeaderMode end |
- (Object) cornerButton (readonly)
Button in the upper left corner Fox::FXButton
265 266 267 |
# File 'rdoc-sources/FXTable.rb', line 265 def cornerButton @cornerButton end |
- (Object) currentColumn (readonly)
Column number for current cell [Integer]
334 335 336 |
# File 'rdoc-sources/FXTable.rb', line 334 def currentColumn @currentColumn end |
- (Object) currentRow (readonly)
Row number for current cell [Integer]
331 332 333 |
# File 'rdoc-sources/FXTable.rb', line 331 def currentRow @currentRow end |
- (Object) defColumnWidth
Default column width, in pixels [Integer]
325 326 327 |
# File 'rdoc-sources/FXTable.rb', line 325 def defColumnWidth @defColumnWidth end |
- (Object) defRowHeight
Default row height, in pixels [Integer]
328 329 330 |
# File 'rdoc-sources/FXTable.rb', line 328 def defRowHeight @defRowHeight end |
- (Object) font
Text font Fox::FXFont
355 356 357 |
# File 'rdoc-sources/FXTable.rb', line 355 def font @font end |
- (Object) gridColor
Grid color Fox::FXColor
379 380 381 |
# File 'rdoc-sources/FXTable.rb', line 379 def gridColor @gridColor end |
- (Object) helpText
Status line help text [String]
391 392 393 |
# File 'rdoc-sources/FXTable.rb', line 391 def helpText @helpText end |
- (Object) hiliteColor
Highlight color Fox::FXColor
364 365 366 |
# File 'rdoc-sources/FXTable.rb', line 364 def hiliteColor @hiliteColor end |
- (Object) marginBottom
Bottom cell margin, in pixels [Integer]
289 290 291 |
# File 'rdoc-sources/FXTable.rb', line 289 def marginBottom @marginBottom end |
- (Object) marginLeft
Left cell margin, in pixels [Integer]
292 293 294 |
# File 'rdoc-sources/FXTable.rb', line 292 def marginLeft @marginLeft end |
- (Object) marginRight
Right cell margin, in pixels [Integer]
295 296 297 |
# File 'rdoc-sources/FXTable.rb', line 295 def marginRight @marginRight end |
- (Object) marginTop
Top cell margin, in pixels [Integer]
286 287 288 |
# File 'rdoc-sources/FXTable.rb', line 286 def marginTop @marginTop end |
- (Object) numColumns (readonly)
Number of columns [Integer]
283 284 285 |
# File 'rdoc-sources/FXTable.rb', line 283 def numColumns @numColumns end |
- (Object) numRows (readonly)
Number of rows [Integer]
280 281 282 |
# File 'rdoc-sources/FXTable.rb', line 280 def numRows @numRows end |
- (Object) rowHeader (readonly)
Row header control Fox::FXHeader
271 272 273 |
# File 'rdoc-sources/FXTable.rb', line 271 def rowHeader @rowHeader end |
- (Object) rowHeaderFont
Row header font Fox::FXFont
313 314 315 |
# File 'rdoc-sources/FXTable.rb', line 313 def rowHeaderFont @rowHeaderFont end |
- (Object) rowHeaderMode
The row header width mode is either fixed (LAYOUT_FIX_WIDTH) or variable. In variable width mode, the row header will size to fit the contents in it. In fixed width mode, the size is explicitly set via the rowHeaderWidth attribute.
310 311 312 |
# File 'rdoc-sources/FXTable.rb', line 310 def rowHeaderMode @rowHeaderMode end |
- (Object) rowHeaderWidth
The fixed row header width, if rowHeaderMode is LAYOUT_FIX_WIDTH.
322 323 324 |
# File 'rdoc-sources/FXTable.rb', line 322 def rowHeaderWidth @rowHeaderWidth end |
- (Object) selBackColor
Background color for selected cell(s) Fox::FXColor
373 374 375 |
# File 'rdoc-sources/FXTable.rb', line 373 def selBackColor @selBackColor end |
- (Object) selEndColumn (readonly)
Ending column number for selection, or -1 if there is no selection [Integer]
352 353 354 |
# File 'rdoc-sources/FXTable.rb', line 352 def selEndColumn @selEndColumn end |
- (Object) selEndRow (readonly)
Ending row number for selection, or -1 if there is no selection [Integer]
349 350 351 |
# File 'rdoc-sources/FXTable.rb', line 349 def selEndRow @selEndRow end |
- (Object) selStartColumn (readonly)
Starting column number for selection, or -1 if there is no selection [Integer]
346 347 348 |
# File 'rdoc-sources/FXTable.rb', line 346 def selStartColumn @selStartColumn end |
- (Object) selStartRow (readonly)
Starting row number for selection, or -1 if there is no selection [Integer]
343 344 345 |
# File 'rdoc-sources/FXTable.rb', line 343 def selStartRow @selStartRow end |
- (Object) selTextColor
Text color for selected cell(s) Fox::FXColor
376 377 378 |
# File 'rdoc-sources/FXTable.rb', line 376 def selTextColor @selTextColor end |
- (Object) shadowColor
Shadow color Fox::FXColor
367 368 369 |
# File 'rdoc-sources/FXTable.rb', line 367 def shadowColor @shadowColor end |
- (Object) stippleColor
Stipple color Fox::FXColor
382 383 384 |
# File 'rdoc-sources/FXTable.rb', line 382 def stippleColor @stippleColor end |
- (Object) tableStyle
Table style [Integer]
298 299 300 |
# File 'rdoc-sources/FXTable.rb', line 298 def tableStyle @tableStyle end |
- (Object) textColor
Text color Fox::FXColor
358 359 360 |
# File 'rdoc-sources/FXTable.rb', line 358 def textColor @textColor end |
- (Object) visibleColumns
Number of visible columns [Integer]
277 278 279 |
# File 'rdoc-sources/FXTable.rb', line 277 def visibleColumns @visibleColumns end |
- (Object) visibleRows
Number of visible rows [Integer]
274 275 276 |
# File 'rdoc-sources/FXTable.rb', line 274 def visibleRows @visibleRows end |
Class Method Details
+ (Object) csvType
Returns the drag type for CSV data
394 |
# File 'rdoc-sources/FXTable.rb', line 394 def FXTable.csvType; end |
+ (Object) csvTypeName
Returns the drag type name for CSV data
397 |
# File 'rdoc-sources/FXTable.rb', line 397 def FXTable.csvTypeName; end |
Instance Method Details
- (Object) acceptInput(notify = false)
End input mode and accept the new value from the control. The item in the cell will be set to the value from the control, and the control will be deleted. If true is passed, a SEL_REPLACED callback will be generated to signify to the target that this call has a new value. You can also accept the input by sending the table an ID_ACCEPT_INPUT message.
476 |
# File 'rdoc-sources/FXTable.rb', line 476 def acceptInput(notify=false); end |
- (Boolean) anythingSelected?
Return true if any cells are selected.
896 |
# File 'rdoc-sources/FXTable.rb', line 896 def anythingSelected?; end |
- (Object) appendColumns(numColumns = 1, notify = false)
Append numColumns columns 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.
642 643 644 |
# File 'lib/fox16/core.rb', line 642 def appendColumns(numColumns=1, notify=false) insertColumns(self.numColumns, numColumns, notify) end |
- (Object) appendRows(numRows = 1, notify = false)
Append numRows rows 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.
651 652 653 |
# File 'lib/fox16/core.rb', line 651 def appendRows(numRows=1, notify=false) insertRows(self.numRows, numRows, notify) end |
- (Object) cancelInput
Cancel input mode. The input control is immediately deleted and the cell will retain its old value. You can also cancel input mode by sending the table an ID_CANCEL_INPUT message.
466 |
# File 'rdoc-sources/FXTable.rb', line 466 def cancelInput(); end |
- (Object) clearItems(notify = false)
Remove all items from table. If notify is true, a SEL_DELETED message is sent to the table's message target before the cells are removed.
585 |
# File 'rdoc-sources/FXTable.rb', line 585 def clearItems(notify=false); end |
- (Object) colAtX(x)
Determine column containing x. Returns -1 if x is to the left of the first column, and numColumns if x is to the right of the last column. Otherwise, returns the column in the table containing x.
491 |
# File 'rdoc-sources/FXTable.rb', line 491 def colAtX(x) ; end |
- (Object) columnRenumbering=(renumber)
Set column renumbering to true or false.
963 |
# File 'rdoc-sources/FXTable.rb', line 963 def columnRenumbering=(renumber); end |
- (Boolean) columnRenumbering?
Get column renumbering
966 |
# File 'rdoc-sources/FXTable.rb', line 966 def columnRenumbering? ; end |
- (Boolean) columnSelected?(c)
Return true if the specified column of cells is selected. Raises IndexError if c is out of bounds.
893 |
# File 'rdoc-sources/FXTable.rb', line 893 def columnSelected?(c); end |
- (Object) countText(text, cs = "\t,", rs = "\n")
Determine the number of rows and columns in a block of text where columns are separated by characters from the set cs, and rows are separated by characters from the set rs. Return a two-element array containing the number of rows and columns, respectively.
787 |
# File 'rdoc-sources/FXTable.rb', line 787 def countText(text, cs="\t,", rs="\n"); end |
- (Object) createItem(text, icon, data)
Create a new table item
954 |
# File 'rdoc-sources/FXTable.rb', line 954 def createItem(text, icon, data) ; end |
- (Object) disableItem(row, column)
Disable cell. Raises IndexError if either row or column is out of bounds.
810 |
# File 'rdoc-sources/FXTable.rb', line 810 def disableItem(row, column) ; end |
- (Object) drawCell(dc, xlo, xhi, ylo, yhi, xoff, yoff, startRow, endRow, startCol, endCol)
Draw a table cell
957 |
# File 'rdoc-sources/FXTable.rb', line 957 def drawCell(dc, xlo, xhi, ylo, yhi, xoff, yoff, startRow, endRow, startCol, endCol) ; end |
- (Object) drawRange(dc, xlo, xhi, ylo, yhi, xoff, yoff, rlo, rhi, clo, chi)
Draw a range of cells
960 |
# File 'rdoc-sources/FXTable.rb', line 960 def drawRange(dc, xlo, xhi, ylo, yhi, xoff, yoff, rlo, rhi, clo, chi) ; end |
- (Object) each_column
Calls block once for each column in the table, passing an array of references (one element per row) as a parameter.
179 180 181 182 183 184 185 186 187 188 |
# File 'lib/fox16/iterators.rb', line 179 def each_column # :yields: itemArray 0.upto(numColumns - 1) do |j| tableCol = [] 0.upto(numRows - 1) do |i| tableCol << getItem(i, j) end yield tableCol end self end |
- (Object) each_row Also known as: each
Calls block once for each row in the table, passing an array of references (one element per column) as a parameter.
164 165 166 167 168 169 170 171 172 173 |
# File 'lib/fox16/iterators.rb', line 164 def each_row # :yields: itemArray 0.upto(numRows - 1) do |i| tableRow = [] 0.upto(numColumns - 1) do |j| tableRow << getItem(i, j) end yield tableRow end self end |
- (Object) editable=(edit)
Set editability of this table to true or false.
447 |
# File 'rdoc-sources/FXTable.rb', line 447 def editable=(edit); end |
- (Boolean) editable?
Return true if this table is editable.
450 |
# File 'rdoc-sources/FXTable.rb', line 450 def editable? ; end |
- (Object) enableItem(row, column)
Enable cell. Raises IndexError if either row or column is out of bounds.
806 |
# File 'rdoc-sources/FXTable.rb', line 806 def enableItem(row, column) ; end |
- (Object) extendSelection(row, column, notify = false)
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.
926 |
# File 'rdoc-sources/FXTable.rb', line 926 def extendSelection(row, column, notify=false) ; end |
- (Object) extractItem(r, c, notify = false)
Extract item from table and return a reference to it. If notify is true, a SEL_REPLACED message is sent to the table's message target before this cell is removed. Raises IndexError if either row or col is out of bounds.
561 |
# File 'rdoc-sources/FXTable.rb', line 561 def extractItem(r, c, notify=false); end |
- (Object) extractText(startrow, endrow, startcol, endcol, cs = "\t", rs = "\n")
Extract the text from all the cells in the specified range and return the result as a string. Within the result string, each column's text is delimited by the string specified by cs, and each row is delimited by the string specified by rs. To reverse this operation (i.e. set the table cells' text from a string), see #overlayText. Raises IndexError if any of startrow, endrow, startcol or endcol is out of bounds.
Parameters:
startrow |
the starting row for the range [Integer] |
endrow |
the ending row for the range [Integer] |
startcol |
the starting column for the range [Integer] |
endcol |
the ending column for the range [Integer] |
cs |
the string to insert at each column break [String] |
rs |
the string to insert at each row break [String] |
755 |
# File 'rdoc-sources/FXTable.rb', line 755 def extractText(startrow, endrow, startcol, endcol, cs="\t", rs="\n"); end |
- (Object) first
Override Enumerable#first with FXWindow#first for backwards compatibility.
156 157 158 |
# File 'lib/fox16/iterators.rb', line 156 def first getFirst end |
- (Object) fitColumnsToContents(col, nc = 1)
Fit column widths to contents, for the nc columns beginning with column index col.
637 |
# File 'rdoc-sources/FXTable.rb', line 637 def fitColumnsToContents(col, nc=1); end |
- (Object) fitRowsToContents(row, nr = 1)
Fit row heights to contents, for the nr rows beginning with row index row.
631 |
# File 'rdoc-sources/FXTable.rb', line 631 def fitRowsToContents(row, nr=1); end |
- (Object) getCellColor(row, column)
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.
951 |
# File 'rdoc-sources/FXTable.rb', line 951 def getCellColor(row, column) ; end |
- (Object) getColumnIcon(index)
Return icon of column header at index. Raises IndexError if index is out of bounds.
661 |
# File 'rdoc-sources/FXTable.rb', line 661 def getColumnIcon(index); end |
- (Object) getColumnIconPosition(index)
Return icon position of column header at index. Raises IndexError if index is out of bounds.
677 |
# File 'rdoc-sources/FXTable.rb', line 677 def getColumnIconPosition(index); end |
- (Object) getColumnJustify(index)
Return justify of column header at index. Raises IndexError if index is out of bounds.
693 |
# File 'rdoc-sources/FXTable.rb', line 693 def getColumnJustify(index); end |
- (Object) getColumnText(index)
Return text of column header at index. Raises IndexError if index is out of bounds.
645 |
# File 'rdoc-sources/FXTable.rb', line 645 def getColumnText(index); end |
- (Object) getColumnWidth(column)
Get column width. Raises IndexError if column is out of bounds.
601 |
# File 'rdoc-sources/FXTable.rb', line 601 def getColumnWidth(column) ; end |
- (Object) getColumnX(column)
Get x-coordinate of column. Raises IndexError if column is out of bounds.
613 |
# File 'rdoc-sources/FXTable.rb', line 613 def getColumnX(column) ; end |
- (Object) getItem(row, column)
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.
495 |
# File 'rdoc-sources/FXTable.rb', line 495 def getItem(row, column) ; end |
- (Object) getItemBorders(r, c)
Return the border style for the cell at (r, c). Raises IndexError if either r or c is out of bounds.
859 |
# File 'rdoc-sources/FXTable.rb', line 859 def getItemBorders(r, c); end |
- (Object) getItemData(row, column)
Return cell user data. Raises IndexError if either row or column is out of bounds.
733 |
# File 'rdoc-sources/FXTable.rb', line 733 def getItemData(row, column) ; end |
- (Object) getItemIcon(row, column)
Return item icon. Raises IndexError if either row or column is out of bounds.
725 |
# File 'rdoc-sources/FXTable.rb', line 725 def getItemIcon(row, column) ; end |
- (Object) getItemIconPosition(r, c)
Return the relative position of the icon and text for the cell at (r, c). Raises IndexError if either r or c is out of bounds.
845 |
# File 'rdoc-sources/FXTable.rb', line 845 def getItemIconPosition(r, c); end |
- (Object) getItemJustify(r, c)
Return item justification for the cell at (r, c). Raises IndexError if either r or c is out of bounds.
830 |
# File 'rdoc-sources/FXTable.rb', line 830 def getItemJustify(r, c); end |
- (Object) getItemStipple(r, c)
Return the background stipple style for the cell at (r, c). Raises IndexError if either r or c is out of bounds.
867 |
# File 'rdoc-sources/FXTable.rb', line 867 def getItemStipple(r, c); end |
- (Object) getItemText(row, column)
Return cell text for item at specified row and column. Raises IndexError if either row or column is out of bounds.
713 |
# File 'rdoc-sources/FXTable.rb', line 713 def getItemText(row, column) ; end |
- (Object) getRowHeight(row)
Get row height. Raises IndexError if row is out of bounds.
609 |
# File 'rdoc-sources/FXTable.rb', line 609 def getRowHeight(row) ; end |
- (Object) getRowIcon(index)
Return icon of row header at index. Raises IndexError if index is out of bounds.
669 |
# File 'rdoc-sources/FXTable.rb', line 669 def getRowIcon(index); end |
- (Object) getRowIconPosition(index)
Return icon position of row header at index. Raises IndexError if index is out of bounds.
685 |
# File 'rdoc-sources/FXTable.rb', line 685 def getRowIconPosition(index); end |
- (Object) getRowJustify(index)
Return justify of row header at index. Raises IndexError if index is out of bounds.
701 |
# File 'rdoc-sources/FXTable.rb', line 701 def getRowJustify(index); end |
- (Object) getRowText(index)
Return text of row header at index. Raises IndexError if index is out of bounds.
653 |
# File 'rdoc-sources/FXTable.rb', line 653 def getRowText(index); end |
- (Object) getRowY(row)
Get y-coordinate of row. Raises IndexError if row is out of bounds.
617 |
# File 'rdoc-sources/FXTable.rb', line 617 def getRowY(row) ; end |
- (Object) horizontalGridShown=(vis)
Set visibility of horizontal grid to true or false.
423 |
# File 'rdoc-sources/FXTable.rb', line 423 def horizontalGridShown=(vis); end |
- (Boolean) horizontalGridShown?
Return true if horizontal grid is shown.
426 |
# File 'rdoc-sources/FXTable.rb', line 426 def horizontalGridShown? ; end |
- (Object) insertColumns(column, numColumns = 1, notify = false)
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.
535 |
# File 'rdoc-sources/FXTable.rb', line 535 def insertColumns(column, numColumns=1, notify=false) ; end |
- (Object) insertRows(row, numRows = 1, notify = false)
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.
525 |
# File 'rdoc-sources/FXTable.rb', line 525 def insertRows(row, numRows=1, notify=false) ; end |
- (Boolean) itemCurrent?(row, column)
Returns true if the cell at position (row, column) is the current cell. Raises IndexError if either row or column is out of bounds.
877 |
# File 'rdoc-sources/FXTable.rb', line 877 def itemCurrent?(row, column) ; end |
- (Boolean) itemEnabled?(row, column)
Returns true if the cell at position (row, column) is enabled. Raises IndexError if either row or column is out of bounds.
814 |
# File 'rdoc-sources/FXTable.rb', line 814 def itemEnabled?(row, column) ; end |
- (Boolean) itemSelected?(row, column)
Returns true if the cell at position (row, column) is selected. Raises IndexError if either row or column is out of bounds.
885 |
# File 'rdoc-sources/FXTable.rb', line 885 def itemSelected?(row, column) ; end |
- (Boolean) itemSpanning?(r, c)
Return true if the cell at position (r, c) is a spanning cell. Raises IndexError if either r or c is out of bounds.
791 |
# File 'rdoc-sources/FXTable.rb', line 791 def itemSpanning?(r, c); end |
- (Boolean) itemVisible?(row, column)
Returns true if the cell at position (row, column) is visible. Raises IndexError if either row or column is out of bounds.
593 |
# File 'rdoc-sources/FXTable.rb', line 593 def itemVisible?(row, column) ; end |
- (Object) killSelection(notify = false)
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.
931 |
# File 'rdoc-sources/FXTable.rb', line 931 def killSelection(notify=false) ; end |
- (Object) makePositionVisible(row, column)
Scroll to make cell at (row, column) fully visible. Raises IndexError if either row or column is out of bounds.
589 |
# File 'rdoc-sources/FXTable.rb', line 589 def makePositionVisible(row, column) ; end |
- (Object) minColumnWidth(c)
Return minimum column width for column c. Raises IndexError if c is out of bounds.
625 |
# File 'rdoc-sources/FXTable.rb', line 625 def minColumnWidth(c); end |
- (Object) minRowHeight(r)
Return minimum row height for row r. Raises IndexError if r is out of bounds.
621 |
# File 'rdoc-sources/FXTable.rb', line 621 def minRowHeight(r); end |
- (Object) overlayText(startrow, endrow, startcol, endcol, text, cs = "\t", rs = "\n", notify = false)
Overlay the text for the cells in the specified range with the fields specified in text. Within the text string, each column's text should delimited by the character specified by cs, and each row should be delimited by the character specified by rs. To reverse this operation (i.e. extract the table cells' text into a string), see #extractText. Raises IndexError if any of startrow, endrow, startcol or endcol is out of bounds.
Parameters:
startrow |
the starting row for the range [Integer] |
endrow |
the ending row for the range [Integer] |
startcol |
the starting column for the range [Integer] |
endcol |
the ending column for the range [Integer] |
text |
the text containing the new cell text [String] |
cs |
the character to insert at each column break [String] |
rs |
the character to insert at each row break [String] |
778 |
# File 'rdoc-sources/FXTable.rb', line 778 def (startrow, endrow, startcol, endcol, text, cs="\t", rs="\n", notify=false); end |
- (Object) removeColumns(column, nc = 1, notify = false)
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.
553 |
# File 'rdoc-sources/FXTable.rb', line 553 def removeColumns(column, nc=1, notify=false) ; end |
- (Object) removeItem(row, col, notify = false)
Remove item at (row, col), replacing it with nil. If notify is true, a SEL_REPLACED message is sent to the table's message target before this cell is removed. Raises IndexError if either row or col is out of bounds.
569 |
# File 'rdoc-sources/FXTable.rb', line 569 def removeItem(row, col, notify=false) ; end |
- (Object) removeRange(startrow, endrow, startcol, endcol, notify = false)
Remove all cells in the specified range of rows and columns. If notify is true, a SEL_REPLACED message is sent to the table's message target before each cell is removed. Raises IndexError if startrow, endrow, startcol or endcol is out of bounds.
578 |
# File 'rdoc-sources/FXTable.rb', line 578 def removeRange(startrow, endrow, startcol, endcol, notify=false); end |
- (Object) removeRows(row, nr = 1, notify = false)
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.
544 |
# File 'rdoc-sources/FXTable.rb', line 544 def removeRows(row, nr=1, notify=false) ; end |
- (Object) rowAtY(y)
Determine row containing y. Returns -1 if y is above the first row, and numRows if y is below the last row. Otherwise, returns the row in the table containing y.
483 |
# File 'rdoc-sources/FXTable.rb', line 483 def rowAtY(y) ; end |
- (Object) rowRenumbering=(renumber)
Set row renumbering to true or false.
969 |
# File 'rdoc-sources/FXTable.rb', line 969 def rowRenumbering=(renumber); end |
- (Boolean) rowRenumbering?
Get row renumbering
972 |
# File 'rdoc-sources/FXTable.rb', line 972 def rowRenumbering? ; end |
- (Boolean) rowSelected?(r)
Return true if the specified row of cells is selected. Raises IndexError if r is out of bounds.
889 |
# File 'rdoc-sources/FXTable.rb', line 889 def rowSelected?(r); end |
- (Object) selectColumn(col, notify = false)
Select a column of cells. If notify is true, a SEL_DESELECTED message is sent to the table's message target for each previously selected cell that becomes deselected as a result of this operation. Likewise, a SEL_SELECTED message is sent to the table's message target for each newly-selected cell. Raises IndexError if col is out of bounds.
912 |
# File 'rdoc-sources/FXTable.rb', line 912 def selectColumn(col, notify=false); end |
- (Object) selectItem(row, col, notify = false)
Select cell at (row, col). 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 col is out of bounds.
660 661 662 |
# File 'lib/fox16/core.rb', line 660 def selectItem(row, col, notify=false) selectRange(row, row, col, col, notify) end |
- (Object) selectRange(startRow, endRow, startColumn, endColumn, notify = false)
Select range. If notify is true, a SEL_DESELECTED message is sent to the table's message target for each previously selected cell that becomes deselected as a result of this operation. Likewise, 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.
920 |
# File 'rdoc-sources/FXTable.rb', line 920 def selectRange(startRow, endRow, startColumn, endColumn, notify=false) ; end |
- (Object) selectRow(row, notify = false)
Select a row of cells. If notify is true, a SEL_DESELECTED message is sent to the table's message target for each previously selected cell that becomes deselected as a result of this operation. Likewise, a SEL_SELECTED message is sent to the table's message target for each newly-selected cell. Raises IndexError if row is out of bounds.
904 |
# File 'rdoc-sources/FXTable.rb', line 904 def selectRow(row, notify=false); end |
- (Object) setAnchorItem(row, column)
Change anchored cell. Raises IndexError if either row or column is out of bounds.
881 |
# File 'rdoc-sources/FXTable.rb', line 881 def setAnchorItem(row, column) ; end |
- (Object) setCellColor(row, column, color)
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.
941 |
# File 'rdoc-sources/FXTable.rb', line 941 def setCellColor(row, column, color) ; end |
- (Object) setColumnIcon(index, icon)
Change column header icon. Raises IndexError if index is out of bounds.
657 |
# File 'rdoc-sources/FXTable.rb', line 657 def setColumnIcon(index, icon); end |
- (Object) setColumnIconPosition(index, mode)
Change column header icon position, e.g. FXHeaderItem::BEFORE, etc. Raises IndexError if index is out of bounds.
673 |
# File 'rdoc-sources/FXTable.rb', line 673 def setColumnIconPosition(index, mode); end |
- (Object) setColumnJustify(index, justify)
Change column header justify, e.g. FXHeaderItem::RIGHT, etc. Raises IndexError if index is out of bounds.
689 |
# File 'rdoc-sources/FXTable.rb', line 689 def setColumnJustify(index, justify); end |
- (Object) setColumnText(index, text)
Set column header at index to text. Raises IndexError if index is out of bounds.
641 |
# File 'rdoc-sources/FXTable.rb', line 641 def setColumnText(index, text); end |
- (Object) setColumnWidth(column, columnWidth)
Set column width. Raises IndexError if column is out of bounds.
597 |
# File 'rdoc-sources/FXTable.rb', line 597 def setColumnWidth(column, columnWidth) ; end |
- (Object) setCurrentItem(row, column, notify = false)
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.
873 |
# File 'rdoc-sources/FXTable.rb', line 873 def setCurrentItem(row, column, notify=false) ; end |
- (Object) setItem(row, column, item)
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.
499 |
# File 'rdoc-sources/FXTable.rb', line 499 def setItem(row, column, item) ; end |
- (Object) setItemBorders(r, c, borders)
Change item borders style for the item at (r, c). Borders on each side of the item can be turned controlled individually using FXTableItem::LBORDER, FXTableItem::RBORDER, FXTableItem::TBORDER and FXTableItem::BBORDER.
Raises IndexError if either r or c is out of bounds.
855 |
# File 'rdoc-sources/FXTable.rb', line 855 def setItemBorders(r, c, borders); end |
- (Object) setItemData(row, column, data)
Modify cell user data. Raises IndexError if either row or column is out of bounds.
729 |
# File 'rdoc-sources/FXTable.rb', line 729 def setItemData(row, column, data) ; end |
- (Object) setItemIcon(row, col, icon, notify = false)
Modify cell icon, deleting the old icon if it was owned. If notify is true, a SEL_REPLACED message is sent to the table's message target before the item's icon is changed.. Raises IndexError if either row or col is out of bounds.
721 |
# File 'rdoc-sources/FXTable.rb', line 721 def setItemIcon(row, col, icon, notify=false) ; end |
- (Object) setItemIconPosition(r, c, mode)
Change relative position of icon and text of item at (r, c). Passing FXTableItem::BEFORE or FXTableItem::AFTER places the icon before or after the text, and passing FXTableItem::ABOVE or FXTableItem::BELOW places it above or below the text, respectively. The default is 0 which places the text on top of the icon.
Raises IndexError if either r or c is out of bounds.
841 |
# File 'rdoc-sources/FXTable.rb', line 841 def setItemIconPosition(r, c, mode); end |
- (Object) setItemJustify(r, c, justify)
Change item justification for the cell at (r, c). Horizontal justification is controlled by passing FXTableItem::RIGHT, FXTableItem::LEFT, or FXTableItem::CENTER_X. Vertical justification is controlled by FXTableItem::TOP, FXTableItem::BOTTOM, or FXTableItem::CENTER_Y. The default is a combination of FXTableItem::RIGHT and FXTableItem::CENTER_Y.
Raises IndexError if either r or c is out of bounds.
826 |
# File 'rdoc-sources/FXTable.rb', line 826 def setItemJustify(r, c, justify); end |
- (Object) setItemStipple(r, c, pat)
Set the background stipple style for the cell at (r, c). Raises IndexError if either r or c is out of bounds.
863 |
# File 'rdoc-sources/FXTable.rb', line 863 def setItemStipple(r, c, pat); end |
- (Object) setItemText(row, col, text, notify = false)
Modify cell text for item at specified row and col. If notify is true, a SEL_REPLACED message is sent to the table's message target before the item's text is changed.. Raises IndexError if either row or col is out of bounds.
709 |
# File 'rdoc-sources/FXTable.rb', line 709 def setItemText(row, col, text, notify=false) ; end |
- (Object) setRowHeight(row, rowHeight)
Set row height. Raises IndexError if row is out of bounds.
605 |
# File 'rdoc-sources/FXTable.rb', line 605 def setRowHeight(row, rowHeight) ; end |
- (Object) setRowIcon(index, icon)
Change row header icon. Raises IndexError if index is out of bounds.
665 |
# File 'rdoc-sources/FXTable.rb', line 665 def setRowIcon(index, icon); end |
- (Object) setRowIconPosition(index, mode)
Change row header icon position, e.g. FXHeaderItem::BEFORE, etc. Raises IndexError if index is out of bounds.
681 |
# File 'rdoc-sources/FXTable.rb', line 681 def setRowIconPosition(index, mode); end |
- (Object) setRowJustify(index, justify)
Change row header justify, e.g. FXHeaderItem::RIGHT, etc. Raises IndexError if index is out of bounds.
697 |
# File 'rdoc-sources/FXTable.rb', line 697 def setRowJustify(index, justify); end |
- (Object) setRowText(index, text)
Set row header at index to text. Raises IndexError if index is out of bounds.
649 |
# File 'rdoc-sources/FXTable.rb', line 649 def setRowText(index, text); end |
- (Object) setTableSize(numRows, numCols, notify = false)
Resize the table content to numRows rows and numCols columns. Note that all existing items in the table will be destroyed and new items will be constructed. 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.
Raises ArgError if either numRows or numCols is less than zero.
515 |
# File 'rdoc-sources/FXTable.rb', line 515 def setTableSize(numRows, numCols, notify=false) ; end |
- (Object) showHorzGrid(on = true)
Show or hide horizontal grid. Note that this is equivalent to the #horizontalGridShown= method.
438 |
# File 'rdoc-sources/FXTable.rb', line 438 def showHorzGrid(on=true) ; end |
- (Object) showVertGrid(on = true)
Show or hide vertical grid. Note that this is equivalent to the #verticalGridShown= method.
444 |
# File 'rdoc-sources/FXTable.rb', line 444 def showVertGrid(on=true) ; end |
- (Object) startInput(row, col)
Start input mode for the cell at the given position. An input control is created which is used to edit the cell; it is filled by the original item's contents if the cell contained an item. You can enter input mode also by sending the table an ID_START_INPUT message.
459 |
# File 'rdoc-sources/FXTable.rb', line 459 def startInput(row, col); end |
- (Object) updateItem(row, column)
Repaint cell. Raises IndexError if either row or column is out of bounds.
802 |
# File 'rdoc-sources/FXTable.rb', line 802 def updateItem(row, column) ; end |
- (Object) updateRange(startRow, endRow, startCol, endCol)
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.
798 |
# File 'rdoc-sources/FXTable.rb', line 798 def updateRange(startRow, endRow, startCol, endCol) ; end |
- (Object) verticalGridShown=(vis)
Set visibility of vertical grid to true or false.
429 |
# File 'rdoc-sources/FXTable.rb', line 429 def verticalGridShown=(vis); end |
- (Boolean) verticalGridShown?
Is vertical grid shown?
432 |
# File 'rdoc-sources/FXTable.rb', line 432 def verticalGridShown? ; end |