wxGrid
Implements methods from the following classes
wxScrolledWindow
Methods
wxGrid
Default constructor.
AppendCols
Appends one or more new columns to the right of the grid.
AppendRows
Appends one or more new rows to the bottom of the grid.
AreHorzGridLinesClipped
Return true if the horizontal grid lines stop at the last column boundary or false if they continue to the end of the window.
AreVertGridLinesClipped
Return true if the vertical grid lines stop at the last row boundary or false if they continue to the end of the window.
AutoSize
Automatically sets the height and width of all rows and columns to fit their contents.
AutoSizeColLabelSize
Automatically adjusts width of the column to fit its label.
AutoSizeColumn
Automatically sizes the column to fit its contents.
AutoSizeColumns
Automatically sizes all columns to fit their contents.
AutoSizeRow
Automatically sizes the row to fit its contents.
AutoSizeRowLabelSize
Automatically adjusts height of the row to fit its label.
AutoSizeRows
Automatically sizes all rows to fit their contents.
BeginBatch
Increments the grid's batch count.
CanDragCell
Return true if the dragging of cells is enabled or false otherwise.
CanDragColMove
Returns true if columns can be moved by dragging with the mouse.
CanDragColSize
Returns true if the given column can be resized by dragging with the mouse.
CanDragGridSize
Return true if the dragging of grid lines to resize rows and columns is enabled or false otherwise.
CanDragRowSize
Returns true if the given row can be resized by dragging with the mouse.
CanEnableCellControl
Returns true if the in-place edit control for the current grid cell can be used and false otherwise.
CellToRect
Return the rectangle corresponding to the grid cell's size and position in logical coordinates.
ClearGrid
Clears all data in the underlying grid table and repaints the grid.
ClearSelection
Deselects all cells that are currently selected.
ClipHorzGridLines
Change whether the horizontal grid lines are clipped by the end of the last column.
ClipVertGridLines
Change whether the vertical grid lines are clipped by the end of the last row.
Create
Creates the grid window for an object initialized using the default constructor.
CreateGrid
Creates a grid with the specified initial number of rows and columns.
DeleteCols
Deletes one or more columns from a grid starting at the specified position.
DeleteRows
Deletes one or more rows from a grid starting at the specified position.
DisableCellEditControl
Disables in-place editing of grid cells.
DisableColResize
Disable interactive resizing of the specified column.
DisableDragColMove
Disables column moving by dragging with the mouse.
DisableDragColSize
Disables column sizing by dragging with the mouse.
DisableDragGridSize
Disable mouse dragging of grid lines to resize rows and columns.
DisableDragRowSize
Disables row sizing by dragging with the mouse.
DisableRowResize
Disable interactive resizing of the specified row.
EnableCellEditControl
Enables or disables in-place editing of grid cell data.
EnableDragCell
Enables or disables cell dragging with the mouse.
EnableDragColMove
Enables or disables column moving by dragging with the mouse.
EnableDragColSize
Enables or disables column sizing by dragging with the mouse.
EnableDragGridSize
Enables or disables row and column resizing by dragging gridlines with the mouse.
EnableDragRowSize
Enables or disables row sizing by dragging with the mouse.
EnableEditing
Makes the grid globally editable or read-only.
EnableGridLines
Turns the drawing of grid lines on or off.
EndBatch
Decrements the grid's batch count.
Fit
Overridden wxWindow method.
ForceRefresh
Causes immediate repainting of the grid.
GetBatchCount
Returns the number of times that BeginBatch() has been called without (yet) matching calls to EndBatch().
GetCellAlignment
Sets the arguments to the horizontal and vertical text alignment values for the grid cell at the specified location.
GetCellBackgroundColour
Returns the background colour of the cell at the specified location.
GetCellEditor
Returns a pointer to the editor for the cell at the specified location.
GetCellFont
Returns the font for text in the grid cell at the specified location.
GetCellRenderer
Returns a pointer to the renderer for the grid cell at the specified location.
GetCellSize
Get the size of the cell in number of cells covered by it.
GetCellTextColour
Returns the text colour for the grid cell at the specified location.
GetCellValue
Returns the string contained in the cell at the specified location.
GetColAt
Returns the column ID of the specified column position.
GetColGridLinePen
Returns the pen used for vertical grid lines.
GetColLabelAlignment
Sets the arguments to the current column label alignment values.
GetColLabelSize
Returns the current height of the column labels.
GetColLabelTextOrientation
Returns the orientation of the column labels (either wxHORIZONTAL or wxVERTICAL).
GetColLabelValue
Returns the specified column label.
GetColMinimalAcceptableWidth
Returns the minimal width to which a column may be resized.
GetColPos
Returns the position of the specified column.
GetColSize
Returns the width of the specified column.
GetColSizes
Get size information for all columns at once.
GetDefaultCellAlignment
Returns the default cell alignment.
GetDefaultCellBackgroundColour
Returns the current default background colour for grid cells.
GetDefaultCellFont
Returns the current default font for grid cell text.
GetDefaultCellTextColour
Returns the current default colour for grid cell text.
GetDefaultColLabelSize
Returns the default height for column labels.
GetDefaultColSize
Returns the current default width for grid columns.
GetDefaultEditor
Returns a pointer to the current default grid cell editor.
GetDefaultEditorForType
Returns the default editor for the cells containing values of the given type.
GetDefaultGridLinePen
Returns the pen used for grid lines.
GetDefaultRenderer
Returns a pointer to the current default grid cell renderer.
GetDefaultRendererForCell
Returns the default renderer for the given cell.
GetDefaultRendererForType
Returns the default renderer for the cell containing values of the given type.
GetDefaultRowLabelSize
Returns the default width for the row labels.
GetDefaultRowSize
Returns the current default height for grid rows.
GetGridColHeader
Return the header control used for column labels display.
GetGridColLabelWindow
Return the column labels window.
GetGridCornerLabelWindow
Return the window in the top left grid corner.
GetGridCursorCol
Returns the current grid cell column position.
GetGridCursorRow
Returns the current grid cell row position.
GetGridLineColour
Returns the colour used for grid lines.
GetGridRowLabelWindow
Return the row labels window.
GetGridWindow
Return the main grid window containing the grid cells.
GetLabelBackgroundColour
Returns the colour used for the background of row and column labels.
GetLabelFont
Returns the font used for row and column labels.
GetLabelTextColour
Returns the colour used for row and column label text.
GetNumberCols
Returns the total number of grid columns.
GetNumberRows
Returns the total number of grid rows.
GetOrCreateCellAttr
Returns the attribute for the given cell creating one if necessary.
GetRowGridLinePen
Returns the pen used for horizontal grid lines.
GetRowLabelAlignment
Returns the alignment used for row labels.
GetRowLabelSize
Returns the current width of the row labels.
GetRowLabelValue
Returns the specified row label.
GetRowMinimalAcceptableHeight
Returns the minimal size to which rows can be resized.
GetRowSize
Returns the height of the specified row.
GetRowSizes
Get size information for all row at once.
GetScrollLineX
Returns the number of pixels per horizontal scroll increment.
GetScrollLineY
Returns the number of pixels per vertical scroll increment.
GetSelectionBackground
Returns the colour used for drawing the selection background.
GetSelectionForeground
Returns the colour used for drawing the selection foreground.
GetSelectionMode
Returns the current selection mode.
GetSortingColumn
Return the column in which the sorting indicator is currently displayed.
GetTable
Returns a base pointer to the current table object.
GoToCell
Make the given cell current and ensure it is visible.
GridLinesEnabled
Returns true if drawing of grid lines is turned on, false otherwise.
HideCellEditControl
Hides the in-place cell edit control.
HideCol
Hides the specified column.
HideColLabels
Hides the column labels by calling SetColLabelSize() with a size of 0.
HideRow
Hides the specified row.
HideRowLabels
Hides the row labels by calling SetRowLabelSize() with a size of 0.
InsertCols
Inserts one or more new columns into a grid with the first new column at the specified position.
InsertRows
Inserts one or more new rows into a grid with the first new row at the specified position.
IsCellEditControlEnabled
Returns true if the in-place edit control is currently enabled.
IsColShown
Returns true if the specified column is not currently hidden.
IsCurrentCellReadOnly
Returns true if the current cell is read-only.
IsEditable
Returns false if the whole grid has been set as read-only or true otherwise.
IsInSelection
Returns true if the given cell is selected.
IsReadOnly
Returns true if the cell at the specified location can't be edited.
IsRowShown
Returns true if the specified row is not currently hidden.
IsSelection
Returns true if there are currently any selected cells, rows, columns or blocks.
IsSortOrderAscending
Return true if the current sorting order is ascending or false if it is descending.
IsSortingBy
Return true if this column is currently used for sorting.
IsVisible
Returns true if a cell is either entirely or at least partially visible in the grid window.
MakeCellVisible
Brings the specified cell into the visible grid cell area with minimal scrolling.
MoveCursorDown
Moves the grid cursor down by one row.
MoveCursorDownBlock
Moves the grid cursor down in the current column such that it skips to the beginning or end of a block of non-empty cells.
MoveCursorLeft
Moves the grid cursor left by one column.
MoveCursorLeftBlock
Moves the grid cursor left in the current row such that it skips to the beginning or end of a block of non-empty cells.
MoveCursorRight
Moves the grid cursor right by one column.
MoveCursorRightBlock
Moves the grid cursor right in the current row such that it skips to the beginning or end of a block of non-empty cells.
MoveCursorUp
Moves the grid cursor up by one row.
MoveCursorUpBlock
Moves the grid cursor up in the current column such that it skips to the beginning or end of a block of non-empty cells.
MovePageDown
Moves the grid cursor down by some number of rows so that the previous bottom visible row becomes the top visible row.
MovePageUp
Moves the grid cursor up by some number of rows so that the previous top visible row becomes the bottom visible row.
RefreshAttr
Invalidates the cached attribute for the given cell.
RegisterDataType
Register a new data type.
ResetColPos
Resets the position of the columns to the default.
SaveEditControlValue
Sets the value of the current grid cell to the current in-place edit control value.
SelectAll
Selects all cells in the grid.
SelectBlock
Selects a rectangular block of cells.
SelectCol
Selects the specified column.
SelectRow
Selects the specified row.
SetCellAlignment
Sets the horizontal and vertical alignment for grid cell text at the specified location.
SetCellBackgroundColour
Set the background colour for the given cell or all cells by default.
SetCellEditor
Sets the editor for the grid cell at the specified location.
SetCellFont
Sets the font for text in the grid cell at the specified location.
SetCellRenderer
Sets the renderer for the grid cell at the specified location.
SetCellSize
Set the size of the cell.
SetCellTextColour
Sets the text colour for the given cell.
SetCellValue
Sets the string value for the cell at the specified location.
SetColAttr
Sets the cell attributes for all cells in the specified column.
SetColFormatBool
Sets the specified column to display boolean values.
SetColFormatCustom
Sets the specified column to display data in a custom format.
SetColFormatFloat
Sets the specified column to display floating point values with the given width and precision.
SetColFormatNumber
Sets the specified column to display integer values.
SetColLabelAlignment
Sets the horizontal and vertical alignment of column label text.
SetColLabelSize
Sets the height of the column labels.
SetColLabelTextOrientation
Sets the orientation of the column labels (either wxHORIZONTAL or wxVERTICAL).
SetColLabelValue
Set the value for the given column label.
SetColMinimalAcceptableWidth
Sets the minimal width to which the user can resize columns.
SetColMinimalWidth
Sets the minimal width for the specified column col.
SetColPos
Sets the position of the specified column.
SetColSize
Sets the width of the specified column.
SetColSizes
Restore all columns sizes.
SetDefaultCellAlignment
Sets the default horizontal and vertical alignment for grid cell text.
SetDefaultCellBackgroundColour
Sets the default background colour for grid cells.
SetDefaultCellFont
Sets the default font to be used for grid cell text.
SetDefaultCellTextColour
Sets the current default colour for grid cell text.
SetDefaultColSize
Sets the default width for columns in the grid.
SetDefaultEditor
Sets the default editor for grid cells.
SetDefaultRenderer
Sets the default renderer for grid cells.
SetDefaultRowSize
Sets the default height for rows in the grid.
SetGridCursor
Set the grid cursor to the specified cell.
SetGridLineColour
Sets the colour used to draw grid lines.
SetLabelBackgroundColour
Sets the background colour for row and column labels.
SetLabelFont
Sets the font for row and column labels.
SetLabelTextColour
Sets the colour for row and column label text.
SetMargins
Sets the extra margins used around the grid area.
SetReadOnly
Makes the cell at the specified location read-only or editable.
SetRowAttr
Sets the cell attributes for all cells in the specified row.
SetRowLabelAlignment
Sets the horizontal and vertical alignment of row label text.
SetRowLabelSize
Sets the width of the row labels.
SetRowLabelValue
Sets the value for the given row label.
SetRowMinimalAcceptableHeight
Sets the minimal row height used by default.
SetRowMinimalHeight
Sets the minimal height for the specified row.
SetRowSize
Sets the height of the specified row.
SetRowSizes
Restore all rows sizes.
SetScrollLineX
Sets the number of pixels per horizontal scroll increment.
SetScrollLineY
Sets the number of pixels per vertical scroll increment.
SetSelectionBackground
Set the colour to be used for drawing the selection background.
SetSelectionForeground
Set the colour to be used for drawing the selection foreground.
SetSelectionMode
Set the selection behaviour of the grid.
SetSortingColumn
Set the column to display the sorting indicator in and its direction.
SetTable
Passes a pointer to a custom grid table to be used by the grid.
SetUseNativeColLabels
Call this in order to make the column labels use a native look by using wxRendererNative::DrawHeaderButton() internally.
ShowCellEditControl
Displays the in-place cell edit control for the current cell.
ShowCol
Shows the previously hidden column by resizing it to non-0 size.
ShowRow
Shows the previously hidden row by resizing it to non-0 size.
UnsetSortingColumn
Remove any currently shown sorting indicator.
UseNativeColHeader
Enable the use of native header window for column labels.
XToCol
Returns the column at the given pixel position.
XToEdgeOfCol
Returns the column whose right hand edge is close to the given logical x position.
YToEdgeOfRow
Returns the row whose bottom edge is close to the given logical y position.
YToRow
Returns the grid row that corresponds to the logical y coordinate.
Static Methods
wxGrid
wxGrid
( )
Default constructor.
wxGrid
(
wxWindow
&
$parent
,
integer
$id
,
wxPoint
$pos
=
wxDefaultPosition
,
wxSize
$size
=
wxDefaultSize
,
integer
$style
=
wxWANTS_CHARS
,
string
$name
=
wxGridNameStr
)
Constructor creating the grid window.
AppendCols
bool
AppendCols
(
integer
$numCols
=
1
,
bool
$updateLabels
=
true
)
Appends one or more new columns to the right of the grid.
AppendRows
bool
AppendRows
(
integer
$numRows
=
1
,
bool
$updateLabels
=
true
)
Appends one or more new rows to the bottom of the grid.
AreHorzGridLinesClipped
bool
AreHorzGridLinesClipped
( )
Return true if the horizontal grid lines stop at the last column boundary or false if they continue to the end of the window.
AreVertGridLinesClipped
bool
AreVertGridLinesClipped
( )
Return true if the vertical grid lines stop at the last row boundary or false if they continue to the end of the window.
AutoSize
AutoSize
( )
Automatically sets the height and width of all rows and columns to fit their contents.
AutoSizeColLabelSize
AutoSizeColLabelSize
(
integer
$col
)
Automatically adjusts width of the column to fit its label.
AutoSizeColumn
AutoSizeColumn
(
integer
$col
,
bool
$setAsMin
=
true
)
Automatically sizes the column to fit its contents.
AutoSizeColumns
AutoSizeColumns
(
bool
$setAsMin
=
true
)
Automatically sizes all columns to fit their contents.
AutoSizeRow
AutoSizeRow
(
integer
$row
,
bool
$setAsMin
=
true
)
Automatically sizes the row to fit its contents.
AutoSizeRowLabelSize
AutoSizeRowLabelSize
(
integer
$col
)
Automatically adjusts height of the row to fit its label.
AutoSizeRows
AutoSizeRows
(
bool
$setAsMin
=
true
)
Automatically sizes all rows to fit their contents.
BeginBatch
BeginBatch
( )
Increments the grid's batch count.
CanDragCell
bool
CanDragCell
( )
Return true if the dragging of cells is enabled or false otherwise.
CanDragColMove
bool
CanDragColMove
( )
Returns true if columns can be moved by dragging with the mouse.
CanDragColSize
bool
CanDragColSize
(
integer
$col
)
Returns true if the given column can be resized by dragging with the mouse.
CanDragGridSize
bool
CanDragGridSize
( )
Return true if the dragging of grid lines to resize rows and columns is enabled or false otherwise.
CanDragRowSize
bool
CanDragRowSize
(
integer
$row
)
Returns true if the given row can be resized by dragging with the mouse.
CanEnableCellControl
bool
CanEnableCellControl
( )
Returns true if the in-place edit control for the current grid cell can be used and false otherwise.
CellToRect
wxRect
CellToRect
(
integer
$row
,
integer
$col
)
Return the rectangle corresponding to the grid cell's size and position in logical coordinates.
ClearGrid
ClearGrid
( )
Clears all data in the underlying grid table and repaints the grid.
ClearSelection
ClearSelection
( )
Deselects all cells that are currently selected.
ClipHorzGridLines
ClipHorzGridLines
(
bool
$clip
)
Change whether the horizontal grid lines are clipped by the end of the last column.
ClipVertGridLines
ClipVertGridLines
(
bool
$clip
)
Change whether the vertical grid lines are clipped by the end of the last row.
Create
bool
Create
(
wxWindow
&
$parent
,
integer
$id
,
wxPoint
$pos
=
wxDefaultPosition
,
wxSize
$size
=
wxDefaultSize
,
integer
$style
=
wxWANTS_CHARS
,
string
$name
=
wxGridNameStr
)
Creates the grid window for an object initialized using the default constructor.
CreateGrid
bool
CreateGrid
(
integer
$numRows
,
integer
$numCols
,
wxGridSelectionModes
$selmode
=
wxGridSelectCells
)
Creates a grid with the specified initial number of rows and columns.
DeleteCols
bool
DeleteCols
(
integer
$pos
,
integer
$numCols
=
1
,
bool
$updateLabels
=
true
)
Deletes one or more columns from a grid starting at the specified position.
DeleteRows
bool
DeleteRows
(
integer
$pos
,
integer
$numRows
=
1
,
bool
$updateLabels
=
true
)
Deletes one or more rows from a grid starting at the specified position.
DisableCellEditControl
DisableCellEditControl
( )
Disables in-place editing of grid cells.
DisableColResize
DisableColResize
(
integer
$col
)
Disable interactive resizing of the specified column.
DisableDragColMove
DisableDragColMove
( )
Disables column moving by dragging with the mouse.
DisableDragColSize
DisableDragColSize
( )
Disables column sizing by dragging with the mouse.
DisableDragGridSize
DisableDragGridSize
( )
Disable mouse dragging of grid lines to resize rows and columns.
DisableDragRowSize
DisableDragRowSize
( )
Disables row sizing by dragging with the mouse.
DisableRowResize
DisableRowResize
(
integer
$row
)
Disable interactive resizing of the specified row.
EnableCellEditControl
EnableCellEditControl
(
bool
$enable
=
true
)
Enables or disables in-place editing of grid cell data.
EnableDragCell
EnableDragCell
(
bool
$enable
=
true
)
Enables or disables cell dragging with the mouse.
EnableDragColMove
EnableDragColMove
(
bool
$enable
=
true
)
Enables or disables column moving by dragging with the mouse.
EnableDragColSize
EnableDragColSize
(
bool
$enable
=
true
)
Enables or disables column sizing by dragging with the mouse.
EnableDragGridSize
EnableDragGridSize
(
bool
$enable
=
true
)
Enables or disables row and column resizing by dragging gridlines with the mouse.
EnableDragRowSize
EnableDragRowSize
(
bool
$enable
=
true
)
Enables or disables row sizing by dragging with the mouse.
EnableEditing
EnableEditing
(
bool
$edit
)
Makes the grid globally editable or read-only.
EnableGridLines
EnableGridLines
(
bool
$enable
=
true
)
Turns the drawing of grid lines on or off.
EndBatch
EndBatch
( )
Decrements the grid's batch count.
Fit
Fit
( )
Overridden wxWindow method.
ForceRefresh
ForceRefresh
( )
Causes immediate repainting of the grid.
GetBatchCount
integer
GetBatchCount
( )
Returns the number of times that BeginBatch() has been called without (yet) matching calls to EndBatch().
GetCellAlignment
GetCellAlignment
(
integer
$row
,
integer
$col
,
integer &
$horiz
,
integer &
$vert
)
Sets the arguments to the horizontal and vertical text alignment values for the grid cell at the specified location.
GetCellBackgroundColour
wxColour
GetCellBackgroundColour
(
integer
$row
,
integer
$col
)
Returns the background colour of the cell at the specified location.
GetCellEditor
wxGridCellEditor
&
GetCellEditor
(
integer
$row
,
integer
$col
)
Returns a pointer to the editor for the cell at the specified location.
GetCellFont
wxFont
GetCellFont
(
integer
$row
,
integer
$col
)
Returns the font for text in the grid cell at the specified location.
GetCellRenderer
wxGridCellRenderer
&
GetCellRenderer
(
integer
$row
,
integer
$col
)
Returns a pointer to the renderer for the grid cell at the specified location.
GetCellSize
CellSpan
GetCellSize
(
integer
$row
,
integer
$col
,
integer &
$num_rows
,
integer &
$num_cols
)
Get the size of the cell in number of cells covered by it.
GetCellTextColour
wxColour
GetCellTextColour
(
integer
$row
,
integer
$col
)
Returns the text colour for the grid cell at the specified location.
GetCellValue
string
GetCellValue
(
integer
$row
,
integer
$col
)
Returns the string contained in the cell at the specified location.
GetColAt
integer
GetColAt
(
integer
$colPos
)
Returns the column ID of the specified column position.
GetColGridLinePen
wxPen
GetColGridLinePen
(
integer
$col
)
Returns the pen used for vertical grid lines.
GetColLabelAlignment
GetColLabelAlignment
(
integer &
$horiz
,
integer &
$vert
)
Sets the arguments to the current column label alignment values.
GetColLabelSize
integer
GetColLabelSize
( )
Returns the current height of the column labels.
GetColLabelTextOrientation
integer
GetColLabelTextOrientation
( )
Returns the orientation of the column labels (either wxHORIZONTAL or wxVERTICAL).
GetColLabelValue
string
GetColLabelValue
(
integer
$col
)
Returns the specified column label.
GetColMinimalAcceptableWidth
integer
GetColMinimalAcceptableWidth
( )
Returns the minimal width to which a column may be resized.
GetColPos
integer
GetColPos
(
integer
$colID
)
Returns the position of the specified column.
GetColSize
integer
GetColSize
(
integer
$col
)
Returns the width of the specified column.
GetColSizes
wxGridSizesInfo
GetColSizes
( )
Get size information for all columns at once.
GetDefaultCellAlignment
GetDefaultCellAlignment
(
integer &
$horiz
,
integer &
$vert
)
Returns the default cell alignment.
GetDefaultCellBackgroundColour
wxColour
GetDefaultCellBackgroundColour
( )
Returns the current default background colour for grid cells.
GetDefaultCellFont
wxFont
GetDefaultCellFont
( )
Returns the current default font for grid cell text.
GetDefaultCellTextColour
wxColour
GetDefaultCellTextColour
( )
Returns the current default colour for grid cell text.
GetDefaultColLabelSize
integer
GetDefaultColLabelSize
( )
Returns the default height for column labels.
GetDefaultColSize
integer
GetDefaultColSize
( )
Returns the current default width for grid columns.
GetDefaultEditor
wxGridCellEditor
&
GetDefaultEditor
( )
Returns a pointer to the current default grid cell editor.
GetDefaultEditorForType
wxGridCellEditor
&
GetDefaultEditorForType
(
string
$typeName
)
Returns the default editor for the cells containing values of the given type.
GetDefaultGridLinePen
wxPen
GetDefaultGridLinePen
( )
Returns the pen used for grid lines.
GetDefaultRenderer
wxGridCellRenderer
&
GetDefaultRenderer
( )
Returns a pointer to the current default grid cell renderer.
GetDefaultRendererForCell
wxGridCellRenderer
&
GetDefaultRendererForCell
(
integer
$row
,
integer
$col
)
Returns the default renderer for the given cell.
GetDefaultRendererForType
wxGridCellRenderer
&
GetDefaultRendererForType
(
string
$typeName
)
Returns the default renderer for the cell containing values of the given type.
GetDefaultRowLabelSize
integer
GetDefaultRowLabelSize
( )
Returns the default width for the row labels.
GetDefaultRowSize
integer
GetDefaultRowSize
( )
Returns the current default height for grid rows.
GetGridColHeader
wxHeaderCtrl
&
GetGridColHeader
( )
Return the header control used for column labels display.
GetGridColLabelWindow
wxWindow
&
GetGridColLabelWindow
( )
Return the column labels window.
GetGridCornerLabelWindow
wxWindow
&
GetGridCornerLabelWindow
( )
Return the window in the top left grid corner.
GetGridCursorCol
integer
GetGridCursorCol
( )
Returns the current grid cell column position.
GetGridCursorRow
integer
GetGridCursorRow
( )
Returns the current grid cell row position.
GetGridLineColour
wxColour
GetGridLineColour
( )
Returns the colour used for grid lines.
GetGridRowLabelWindow
wxWindow
&
GetGridRowLabelWindow
( )
Return the row labels window.
GetGridWindow
wxWindow
&
GetGridWindow
( )
Return the main grid window containing the grid cells.
GetLabelBackgroundColour
wxColour
GetLabelBackgroundColour
( )
Returns the colour used for the background of row and column labels.
GetLabelFont
wxFont
GetLabelFont
( )
Returns the font used for row and column labels.
GetLabelTextColour
wxColour
GetLabelTextColour
( )
Returns the colour used for row and column label text.
GetNumberCols
integer
GetNumberCols
( )
Returns the total number of grid columns.
GetNumberRows
integer
GetNumberRows
( )
Returns the total number of grid rows.
GetOrCreateCellAttr
wxGridCellAttr
&
GetOrCreateCellAttr
(
integer
$row
,
integer
$col
)
Returns the attribute for the given cell creating one if necessary.
GetRowGridLinePen
wxPen
GetRowGridLinePen
(
integer
$row
)
Returns the pen used for horizontal grid lines.
GetRowLabelAlignment
GetRowLabelAlignment
(
integer &
$horiz
,
integer &
$vert
)
Returns the alignment used for row labels.
GetRowLabelSize
integer
GetRowLabelSize
( )
Returns the current width of the row labels.
GetRowLabelValue
string
GetRowLabelValue
(
integer
$row
)
Returns the specified row label.
GetRowMinimalAcceptableHeight
integer
GetRowMinimalAcceptableHeight
( )
Returns the minimal size to which rows can be resized.
GetRowSize
integer
GetRowSize
(
integer
$row
)
Returns the height of the specified row.
GetRowSizes
wxGridSizesInfo
GetRowSizes
( )
Get size information for all row at once.
GetScrollLineX
integer
GetScrollLineX
( )
Returns the number of pixels per horizontal scroll increment.
GetScrollLineY
integer
GetScrollLineY
( )
Returns the number of pixels per vertical scroll increment.
GetSelectionBackground
wxColour
GetSelectionBackground
( )
Returns the colour used for drawing the selection background.
GetSelectionForeground
wxColour
GetSelectionForeground
( )
Returns the colour used for drawing the selection foreground.
GetSelectionMode
wxGridSelectionModes
GetSelectionMode
( )
Returns the current selection mode.
GetSortingColumn
integer
GetSortingColumn
( )
Return the column in which the sorting indicator is currently displayed.
GetTable
wxGridTableBase
&
GetTable
( )
Returns a base pointer to the current table object.
GoToCell
GoToCell
(
integer
$row
,
integer
$col
)
Make the given cell current and ensure it is visible.
GridLinesEnabled
bool
GridLinesEnabled
( )
Returns true if drawing of grid lines is turned on, false otherwise.
HideCellEditControl
HideCellEditControl
( )
Hides the in-place cell edit control.
HideCol
HideCol
(
integer
$col
)
Hides the specified column.
HideColLabels
HideColLabels
( )
Hides the column labels by calling SetColLabelSize() with a size of 0.
HideRow
HideRow
(
integer
$col
)
Hides the specified row.
HideRowLabels
HideRowLabels
( )
Hides the row labels by calling SetRowLabelSize() with a size of 0.
InsertCols
bool
InsertCols
(
integer
$pos
,
integer
$numCols
=
1
,
bool
$updateLabels
=
true
)
Inserts one or more new columns into a grid with the first new column at the specified position.
InsertRows
bool
InsertRows
(
integer
$pos
,
integer
$numRows
=
1
,
bool
$updateLabels
=
true
)
Inserts one or more new rows into a grid with the first new row at the specified position.
IsCellEditControlEnabled
bool
IsCellEditControlEnabled
( )
Returns true if the in-place edit control is currently enabled.
IsColShown
bool
IsColShown
(
integer
$col
)
Returns true if the specified column is not currently hidden.
IsCurrentCellReadOnly
bool
IsCurrentCellReadOnly
( )
Returns true if the current cell is read-only.
IsEditable
bool
IsEditable
( )
Returns false if the whole grid has been set as read-only or true otherwise.
IsInSelection
bool
IsInSelection
(
integer
$row
,
integer
$col
)
Returns true if the given cell is selected.
IsReadOnly
bool
IsReadOnly
(
integer
$row
,
integer
$col
)
Returns true if the cell at the specified location can't be edited.
IsRowShown
bool
IsRowShown
(
integer
$row
)
Returns true if the specified row is not currently hidden.
IsSelection
bool
IsSelection
( )
Returns true if there are currently any selected cells, rows, columns or blocks.
IsSortOrderAscending
bool
IsSortOrderAscending
( )
Return true if the current sorting order is ascending or false if it is descending.
IsSortingBy
bool
IsSortingBy
(
integer
$col
)
Return true if this column is currently used for sorting.
IsVisible
bool
IsVisible
(
integer
$row
,
integer
$col
,
bool
$wholeCellVisible
=
true
)
Returns true if a cell is either entirely or at least partially visible in the grid window.
MakeCellVisible
MakeCellVisible
(
integer
$row
,
integer
$col
)
Brings the specified cell into the visible grid cell area with minimal scrolling.
MoveCursorDown
bool
MoveCursorDown
(
bool
$expandSelection
)
Moves the grid cursor down by one row.
MoveCursorDownBlock
bool
MoveCursorDownBlock
(
bool
$expandSelection
)
Moves the grid cursor down in the current column such that it skips to the beginning or end of a block of non-empty cells.
MoveCursorLeft
bool
MoveCursorLeft
(
bool
$expandSelection
)
Moves the grid cursor left by one column.
MoveCursorLeftBlock
bool
MoveCursorLeftBlock
(
bool
$expandSelection
)
Moves the grid cursor left in the current row such that it skips to the beginning or end of a block of non-empty cells.
MoveCursorRight
bool
MoveCursorRight
(
bool
$expandSelection
)
Moves the grid cursor right by one column.
MoveCursorRightBlock
bool
MoveCursorRightBlock
(
bool
$expandSelection
)
Moves the grid cursor right in the current row such that it skips to the beginning or end of a block of non-empty cells.
MoveCursorUp
bool
MoveCursorUp
(
bool
$expandSelection
)
Moves the grid cursor up by one row.
MoveCursorUpBlock
bool
MoveCursorUpBlock
(
bool
$expandSelection
)
Moves the grid cursor up in the current column such that it skips to the beginning or end of a block of non-empty cells.
MovePageDown
bool
MovePageDown
( )
Moves the grid cursor down by some number of rows so that the previous bottom visible row becomes the top visible row.
MovePageUp
bool
MovePageUp
( )
Moves the grid cursor up by some number of rows so that the previous top visible row becomes the bottom visible row.
RefreshAttr
RefreshAttr
(
integer
$row
,
integer
$col
)
Invalidates the cached attribute for the given cell.
RegisterDataType
RegisterDataType
(
string
$typeName
,
wxGridCellRenderer
&
$renderer
,
wxGridCellEditor
&
$editor
)
Register a new data type.
ResetColPos
ResetColPos
( )
Resets the position of the columns to the default.
SaveEditControlValue
SaveEditControlValue
( )
Sets the value of the current grid cell to the current in-place edit control value.
SelectAll
SelectAll
( )
Selects all cells in the grid.
SelectBlock
SelectBlock
(
integer
$topRow
,
integer
$leftCol
,
integer
$bottomRow
,
integer
$rightCol
,
bool
$addToSelected
=
false
)
Selects a rectangular block of cells.
SelectCol
SelectCol
(
integer
$col
,
bool
$addToSelected
=
false
)
Selects the specified column.
SelectRow
SelectRow
(
integer
$row
,
bool
$addToSelected
=
false
)
Selects the specified row.
SetCellAlignment
SetCellAlignment
(
integer
$row
,
integer
$col
,
integer
$horiz
,
integer
$vert
)
Sets the horizontal and vertical alignment for grid cell text at the specified location.
SetCellAlignment
(
integer
$align
,
integer
$row
,
integer
$col
)
Sets the horizontal and vertical alignment for grid cell text at the specified location.
SetCellBackgroundColour
SetCellBackgroundColour
(
integer
$row
,
integer
$col
,
wxColour
$colour
)
Set the background colour for the given cell or all cells by default.
SetCellEditor
SetCellEditor
(
integer
$row
,
integer
$col
,
wxGridCellEditor
&
$editor
)
Sets the editor for the grid cell at the specified location.
SetCellFont
SetCellFont
(
integer
$row
,
integer
$col
,
wxFont
$font
)
Sets the font for text in the grid cell at the specified location.
SetCellRenderer
SetCellRenderer
(
integer
$row
,
integer
$col
,
wxGridCellRenderer
&
$renderer
)
Sets the renderer for the grid cell at the specified location.
SetCellSize
SetCellSize
(
integer
$row
,
integer
$col
,
integer
$num_rows
,
integer
$num_cols
)
Set the size of the cell.
SetCellTextColour
SetCellTextColour
(
integer
$row
,
integer
$col
,
wxColour
$colour
)
Sets the text colour for the given cell.
SetCellTextColour
(
wxColour
$val
,
integer
$row
,
integer
$col
)
Sets the text colour for the given cell.
SetCellTextColour
(
wxColour
$colour
)
Sets the text colour for all cells by default.
SetCellValue
SetCellValue
(
integer
$row
,
integer
$col
,
string
$s
)
Sets the string value for the cell at the specified location.
SetCellValue
(
string
$val
,
integer
$row
,
integer
$col
)
SetColAttr
SetColAttr
(
integer
$col
,
wxGridCellAttr
&
$attr
)
Sets the cell attributes for all cells in the specified column.
SetColFormatBool
SetColFormatBool
(
integer
$col
)
Sets the specified column to display boolean values.
SetColFormatCustom
SetColFormatCustom
(
integer
$col
,
string
$typeName
)
Sets the specified column to display data in a custom format.
SetColFormatFloat
SetColFormatFloat
(
integer
$col
,
integer
$width
=
-1
,
integer
$precision
=
-1
)
Sets the specified column to display floating point values with the given width and precision.
SetColFormatNumber
SetColFormatNumber
(
integer
$col
)
Sets the specified column to display integer values.
SetColLabelAlignment
SetColLabelAlignment
(
integer
$horiz
,
integer
$vert
)
Sets the horizontal and vertical alignment of column label text.
SetColLabelSize
SetColLabelSize
(
integer
$height
)
Sets the height of the column labels.
SetColLabelTextOrientation
SetColLabelTextOrientation
(
integer
$textOrientation
)
Sets the orientation of the column labels (either wxHORIZONTAL or wxVERTICAL).
SetColLabelValue
SetColLabelValue
(
integer
$col
,
string
$value
)
Set the value for the given column label.
SetColMinimalAcceptableWidth
SetColMinimalAcceptableWidth
(
integer
$width
)
Sets the minimal width to which the user can resize columns.
SetColMinimalWidth
SetColMinimalWidth
(
integer
$col
,
integer
$width
)
Sets the minimal width for the specified column col.
SetColPos
SetColPos
(
integer
$colID
,
integer
$newPos
)
Sets the position of the specified column.
SetColSize
SetColSize
(
integer
$col
,
integer
$width
)
Sets the width of the specified column.
SetColSizes
SetColSizes
(
wxGridSizesInfo
$sizeInfo
)
Restore all columns sizes.
SetDefaultCellAlignment
SetDefaultCellAlignment
(
integer
$horiz
,
integer
$vert
)
Sets the default horizontal and vertical alignment for grid cell text.
SetDefaultCellBackgroundColour
SetDefaultCellBackgroundColour
(
wxColour
$colour
)
Sets the default background colour for grid cells.
SetDefaultCellFont
SetDefaultCellFont
(
wxFont
$font
)
Sets the default font to be used for grid cell text.
SetDefaultCellTextColour
SetDefaultCellTextColour
(
wxColour
$colour
)
Sets the current default colour for grid cell text.
SetDefaultColSize
SetDefaultColSize
(
integer
$width
,
bool
$resizeExistingCols
=
false
)
Sets the default width for columns in the grid.
SetDefaultEditor
SetDefaultEditor
(
wxGridCellEditor
&
$editor
)
Sets the default editor for grid cells.
SetDefaultRenderer
SetDefaultRenderer
(
wxGridCellRenderer
&
$renderer
)
Sets the default renderer for grid cells.
SetDefaultRowSize
SetDefaultRowSize
(
integer
$height
,
bool
$resizeExistingRows
=
false
)
Sets the default height for rows in the grid.
SetGridCursor
SetGridCursor
(
integer
$row
,
integer
$col
)
Set the grid cursor to the specified cell.
SetGridLineColour
SetGridLineColour
(
wxColour
$colour
)
Sets the colour used to draw grid lines.
SetLabelBackgroundColour
SetLabelBackgroundColour
(
wxColour
$colour
)
Sets the background colour for row and column labels.
SetLabelFont
SetLabelFont
(
wxFont
$font
)
Sets the font for row and column labels.
SetLabelTextColour
SetLabelTextColour
(
wxColour
$colour
)
Sets the colour for row and column label text.
SetMargins
SetMargins
(
integer
$extraWidth
,
integer
$extraHeight
)
Sets the extra margins used around the grid area.
SetReadOnly
SetReadOnly
(
integer
$row
,
integer
$col
,
bool
$isReadOnly
=
true
)
Makes the cell at the specified location read-only or editable.
SetRowAttr
SetRowAttr
(
integer
$row
,
wxGridCellAttr
&
$attr
)
Sets the cell attributes for all cells in the specified row.
SetRowLabelAlignment
SetRowLabelAlignment
(
integer
$horiz
,
integer
$vert
)
Sets the horizontal and vertical alignment of row label text.
SetRowLabelSize
SetRowLabelSize
(
integer
$width
)
Sets the width of the row labels.
SetRowLabelValue
SetRowLabelValue
(
integer
$row
,
string
$value
)
Sets the value for the given row label.
SetRowMinimalAcceptableHeight
SetRowMinimalAcceptableHeight
(
integer
$height
)
Sets the minimal row height used by default.
SetRowMinimalHeight
SetRowMinimalHeight
(
integer
$row
,
integer
$height
)
Sets the minimal height for the specified row.
SetRowSize
SetRowSize
(
integer
$row
,
integer
$height
)
Sets the height of the specified row.
SetRowSizes
SetRowSizes
(
wxGridSizesInfo
$sizeInfo
)
Restore all rows sizes.
SetScrollLineX
SetScrollLineX
(
integer
$x
)
Sets the number of pixels per horizontal scroll increment.
SetScrollLineY
SetScrollLineY
(
integer
$y
)
Sets the number of pixels per vertical scroll increment.
SetSelectionBackground
SetSelectionBackground
(
wxColour
$c
)
Set the colour to be used for drawing the selection background.
SetSelectionForeground
SetSelectionForeground
(
wxColour
$c
)
Set the colour to be used for drawing the selection foreground.
SetSelectionMode
SetSelectionMode
(
wxGridSelectionModes
$selmode
)
Set the selection behaviour of the grid.
SetSortingColumn
SetSortingColumn
(
integer
$col
,
bool
$ascending
=
true
)
Set the column to display the sorting indicator in and its direction.
SetTable
bool
SetTable
(
wxGridTableBase
&
$table
,
bool
$takeOwnership
=
false
,
wxGridSelectionModes
$selmode
=
wxGridSelectCells
)
Passes a pointer to a custom grid table to be used by the grid.
SetUseNativeColLabels
SetUseNativeColLabels
(
bool
$native
=
true
)
Call this in order to make the column labels use a native look by using wxRendererNative::DrawHeaderButton() internally.
ShowCellEditControl
ShowCellEditControl
( )
Displays the in-place cell edit control for the current cell.
ShowCol
ShowCol
(
integer
$col
)
Shows the previously hidden column by resizing it to non-0 size.
ShowRow
ShowRow
(
integer
$col
)
Shows the previously hidden row by resizing it to non-0 size.
UnsetSortingColumn
UnsetSortingColumn
( )
Remove any currently shown sorting indicator.
UseNativeColHeader
UseNativeColHeader
(
bool
$native
=
true
)
Enable the use of native header window for column labels.
XToCol
integer
XToCol
(
integer
$x
,
bool
$clipToMinMax
=
false
)
Returns the column at the given pixel position.
XToEdgeOfCol
integer
XToEdgeOfCol
(
integer
$x
)
Returns the column whose right hand edge is close to the given logical x position.
YToEdgeOfRow
integer
YToEdgeOfRow
(
integer
$y
)
Returns the row whose bottom edge is close to the given logical y position.
YToRow
integer
YToRow
(
integer
$y
,
bool
$clipToMinMax
=
false
)
Returns the grid row that corresponds to the logical y coordinate.