Appends cols columns to the grid.
Appends rows rows to the grid.
Automatically sizes the row to fit its contents. If setAsMin is true the calculated height will also be set as the minimal height for the row.
Note: wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used. The memory requirements for this could become prohibitive if your grid is very large.
Resizes each column to the minimum size required to display all the data in each column.
Automatically sets the height and width of all rows and columns to fit their contents.
Note: wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used. The memory requirements for this could become prohibitive if your grid is very large.
Automatically sizes all rows to fit their contents. If setAsMin is true the calculated heights will also be set as the minimal heights for the rows.
Note: wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used. The memory requirements for this could become prohibitive if your grid is very large.
Returns: number of unmatched calls to begin_batch()
Stops updates of the grid until end_batch() is called. This is useful for when you need to modify a large number of cells.
Returns true if columns can be moved by dragging with the mouse. Columns can be moved by dragging on their labels.
Returns true if columns can be resized by dragging with the mouse. Columns can be resized by dragging the edges of their labels. If grid line dragging is enabled they can also be resized by dragging the right edge of the column in the grid cell area (see enable_drag_grid_col_size).
Returns true if rows can be resized by dragging with the mouse. Rows can be resized by dragging the edges of their labels. If grid line dragging is enabled they can also be resized by dragging the lower edge of the row in the grid cell area (see enable_drag_grid_row_size).
Return true if the dragging of grid lines to resize rows and columns is enabled or false otherwise.
Returns true if the in-place edit control for the current grid cell can be used and false otherwise (e.g. if the current cell is read-only).
Deletes all data in the grid.
Deselects all cells that are currently selected.
Deletes n columns from the grid at position pos. If relabel is TRUE, the function OnChangeLabels is called to give the application the opportunity to relabel.
Deletes n rows from the grid at position pos. If relabel is TRUE, the function OnChangeLabels is called to give the application the opportunity to relabel.
Enables or disables column moving by dragging with the mouse.
Enables or disables column sizing by dragging with the mouse.
Enables or disables row sizing by dragging with the mouse.
Enables or disables row and column resizing by dragging gridlines with the mouse.
Enables or disables in-place editing of grid cell data. The grid will issue either a wxEVT_GRID_EDITOR_SHOWN or wxEVT_GRID_EDITOR_HIDDEN event.
If the edit argument is false this function sets the whole grid as read-only. If the argument is true the grid is set to the default state where cells may be editable. In the default state you can set single grid cells and whole rows and columns to be editable or read-only via wxGridCellAttribute::SetReadOnly. For single cells you can also use the shortcut function wxGrid::SetReadOnly.
For more information about controlling grid cell attributes see the wxGridCellAttr cell attribute class and the wxGrid classes overview.
Turns the drawing of grid lines on or off.
Resumes updating of the grid after a call to begin_batch(). This is useful for when you need to modify a large number of cells.
Causes immediate repainting of the grid. Use this instead of the usual refresh_window.
Sets the arguments to the horizontal and vertical text alignment values for the grid cell at the specified location.
Horizontal alignment will be one of wxALIGN_LEFT, wxALIGN_CENTRE or wxALIGN_RIGHT. Vertical alignment will be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM.
Returns the background colour of the cell at the specified location.
Returns the wxGridCellEditor for the cell
Returns the Control belonging to the wxGridCellEditor
If editor is a sequence, then it specifies the { row, column } of the wxGridCellEditor to be fetched. Otherwise, it is a wxGridCellEditor (see get_cell_editor).
Returns the font for text in the grid cell at the specified location.
Returns the text colour for the grid cell at the specified location.
Returns: string containing the value
If the cell contains numeric data, you will need to use value(), since all values returned by get_cell_value() are strings (this is how wxGrid stores everything).
Returns a sequence which holds the information at the top of the column specified by 'column'. The first column is 0. The column index increases as it goes to the right.
Returns an integer which represents the height of the columns in pixels.
Returns the width of the specified column.
Returns the current default background colour for grid cells.
Returns the current default font for grid cell text.
Returns the current default colour for grid cell text.
Returns the default height for column labels.
Returns the current default width for grid columns.
Returns a pointer to the current default grid cell editor.
See wxGridCellEditor and the wxGrid overview for more information about cell editors and renderers.
Returns the default width for the row labels.
Returns the current default height for grid rows.
Returns the number of times that begin_batch has been called without (yet) matching calls to end_batch. While the grid's batch count is greater than zero the display will not be updated.
Returns the colour used for the background of row and column labels.
Returns the font used for row and column labels.
Returns the colour used for row and column label text.
Returns true if drawing of grid lines is turned on, false otherwise.
Returns the colour used for grid lines.
Sets the arguments to the current row label alignment values.
Horizontal alignment will be one of wxLEFT, wxCENTRE or wxRIGHT. Vertical alignment will be one of wxTOP, wxCENTRE or wxBOTTOM.
Returns the number of pixels per scroll increment. The default is 15.
Access or update the selection fore/back colours
See get_grid_selection_background.
Returned number of whole cols visible.
Returns the total number of grid columns (actually the number of columns in the underlying grid table).
Returns the total number of grid rows (actually the number of rows in the underlying grid table).
Returns an integer which represents the width of the rows in pixels.
Returns the height of the specified row.
Return the rectangle corresponding to the grid cell's size and position in logical coordinates.
Returns: {row, col}
Call this inside of wxGrid event handlers to get the row and column where the event is taking place.
Returns: { cursor_row, cursor_col }
Returns: Sequence {rows,cols} indicating the current size of the grid.
Hides the in-place cell edit control.
Inserts one or more new columns into a grid with the first new column at the specified position and returns true if successful.
Inserts one or more new rows into a grid with the first new row at the specified position and returns true if successful.
Returns true if the in-place edit control is currently enabled.
Returns true if a cell is either wholly visible (the default) or at least partially visible in the grid window.
Returns true if the current cell has been set to read-only.
Returns false if the whole grid has been set as read-only or true otherwise.
Is this cell currently selected.
Returns true if there are currently rows, columns or blocks of cells selected.
Returns: last visible cell in the grid
Scrolls the grid if necessary to make the cell visible.
Moves the grid cursor down by one row. If a block of cells was previously selected it will expand if the argument is true or be cleared if expand_selection is false.
Keyboard
This function is called for Down cursor key presses or Shift+Down to expand a selection.
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. If a block of cells was previously selected it will expand if expand_selection is true or be cleared if the argument is false.
Keyboard
This function is called for the Ctrl+Down key combination. Shift+Ctrl+Down expands a selection.
Moves the grid cursor left by one column. If a block of cells was previously selected it will expand if the argument is true or be cleared if expand_selection is false.
Keyboard
This function is called for Left cursor key presses or Shift+Left to expand a selection.
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. If a block of cells was previously selected it will expand if expand_selection is true or be cleared if the argument is false.
Keyboard
This function is called for the Ctrl+Left key combination. Shift+Ctrl+left expands a selection.
Moves the grid cursor right by one column. If a block of cells was previously selected it will expand if the argument is true or be cleared if expand_selection is false.
Keyboard
This function is called for Right cursor key presses or Shift+Right to expand a selection.
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. If a block of cells was previously selected it will expand if expand_selection is true or be cleared if the argument is false.
Keyboard
This function is called for the Ctrl+Right key combination. Shift+Ctrl+Right expands a selection.
Moves the grid cursor up by one row. If a block of cells was previously selected it will expand if the argument is true or be cleared if expand_selection is false.
Keyboard
This function is called for Up cursor key presses or Shift+Up to expand a selection.
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. If a block of cells was previously selected it will expand if expand_selection is true or be cleared if the argument is false.
Keyboard
This function is called for the Ctrl+Up key combination. Shift+Ctrl+Up expands a selection.
Moves the grid cursor down by some number of rows so that the previous bottom visible row becomes the top visible row.
Keyboard
This function is called for PgDn keypresses.
Moves the grid cursor up by some number of rows so that the previous top visible row becomes the bottom visible row.
Keyboard
This function is called for PgUp keypresses.
Sets the value of the current grid cell to the current in-place edit control value. This is called automatically when the grid cursor moves from the current cell to a new cell. It is also a good idea to call this function when closing a grid since any edits to the final cell location will not be saved otherwise.
Selects all cells in the grid.
Selects a rectangular block of cells. If add_to_selected is false then any existing selection will be deselected; if true the column will be added to the existing selection.
Moves the cursor and selection to the cell specified.
Selects the specified column.
Selects the specified row.
Moves the cursor to the current cell being edited. Does not alter the selection (see select_grid_cell)
Set the vertical of horizontal alignment of a cell:
Allows entries other than the standard text based editor to be used.
The only editors currently supported are:
Sets the font for text in the grid cell at the specified location.
Makes the cell read only if readonly is 1, or allows editing if readonly is 0.
Sets the text colour for the grid cell at the specified location.
Sets the contents of a cell. If val is an atom, then the contents of the cell will be sprint(val).
Set the vertical of horizontal alignment of a column:
Allows entries other than the standard text based editor to be used.
The only editors currently supported are:
Sets the specified column to display boolean values. wxGrid displays boolean values with a checkbox.
Sets the specified column to display floating point values with the given width and precision.
Sets the specified column to display integer values.
Changes the label of a column.
Use wxLEFT, wxRIGHT and wxTOP, wxBOTTOM (or zero for center)
If height equals to wxGRID_AUTOSIZE then height is calculated automatically so that no label is truncated. Note that this could be slow for a large table. This flag is new since wxWidgets version 2.8.8.
Sets the position of the specified column.
Sets the specified col in the specified grid to be read only if readonly is 1. Editing will be allowed if readonly is 0.
Change the size of a grid column. This function does not refresh the grid. If you are calling it outside of a BeginBatch EndBatch block you can use force_refresh_grid to see the changes
Sets the default horizontal and vertical alignment for grid cell text.
Horizontal alignment should be one of wxALIGN_LEFT, wxALIGN_CENTRE or wxALIGN_RIGHT. Vertical alignment should be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM.
Sets the default background colour for grid cells.
Sets the default font to be used for grid cell text.
Sets the current default colour for grid cell text.
Sets the default width for columns in the grid. This will only affect columns subsequently added to the grid unless resize_existing is true.
Sets the default cell editor control for the grid.
Sets the default height for rows in the grid. This will only affect rows subsequently added to the grid unless resize_existing is true.
If cell is an integer, then it refers to an entire column, and the choices will be set for the column editor. If cell is a sequence, it refers to the cell by {row, column}, and that cell's editor will be set.
Makes the entire grid uneditable by the user is editable is 0, or allows editing if editable is 1.
Sets the background colour for row and column labels.
Sets the font for row and column labels.
Sets the colour for row and column label text.
Change the color of the lines in the grid.
A grid may occupy more space than needed for its rows/columns. This function allows to set how big this extra space is.
Sets the number of pixels per scroll increment. The default is 15. Sometimes wxGrid has trouble setting the scrollbars correctly due to rounding errors: setting this to 1 can help.
Set the selection behaviour of the grid.
mode can be one of the following:
Adds or deletes columns or rows as required.
Changes the label of a row.
Use wxLEFT, wxRIGHT and wxTOP, wxBOTTOM (or zero for center)
This sets the labels of rows in a wxGrid to be 'width' pixels high.
Sets the height of the specified row.
This function does not refresh the grid. If you are calling it outside of a begin_batch end_batch block you can use refresh_grid to see the changes.
Note: wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used. The memory requirements for this could become prohibitive if your grid is very large.
Displays the in-place cell edit control for the current cell.