wxGrid — wx v2.5.4

Search documentation of wx

# wxGrid (wx v2.5.4)

View Source

`wxGrid` and its related classes are used for displaying and editing tabular data.

They provide a rich set of features for display, editing, and interacting with a variety of data sources. For simple applications, and to help you get started, `wxGrid` is the only class you need to refer to directly. It will set up default instances of the other classes and manage them for you. For more complex applications you can derive your own classes for custom grid views, grid data tables, cell editors and renderers. The overview_grid has examples of simple and more complex applications, explains the relationship between the various grid classes and has a summary of the keyboard shortcuts and mouse functions provided by `wxGrid`.

A `wxGridTableBase` (not implemented in wx) class holds the actual data to be displayed by a `wxGrid` class. One or more `wxGrid` classes may act as a view for one table class. The default table class is called `wxGridStringTable` (not implemented in wx) and holds an array of strings. An instance of such a class is created by `createGrid/4`.

`wxGridCellRenderer` is the abstract base class for rendering contents in a cell. The following renderers are predefined:

- `wxGridCellBoolRenderer`

- `wxGridCellFloatRenderer`

- `wxGridCellNumberRenderer`

- `wxGridCellStringRenderer`

- `wxGridCellDateRenderer` (not implemented in wx)

- `wxGridCellDateTimeRenderer` (not implemented in wx)

The look of a cell can be further defined using `wxGridCellAttr`. An object of this type may be returned by `wxGridTableBase::GetAttr()` (not implemented in wx).

`wxGridCellEditor` is the abstract base class for editing the value of a cell. The following editors are predefined:

- `wxGridCellBoolEditor`

- `wxGridCellChoiceEditor`

- `wxGridCellFloatEditor`

- `wxGridCellNumberEditor`

- `wxGridCellTextEditor`

- `wxGridCellDateEditor` (not implemented in wx)

Please see `wxGridEvent`, `wxGridSizeEvent` (not implemented in wx), `wxGridRangeSelectEvent` (not implemented in wx), and `wxGridEditorCreatedEvent` (not implemented in wx) for the documentation of all event types you can use with `wxGrid`.

See: Overview grid

This class is derived, and can use functions, from:

- `wxScrolledWindow`

- `wxPanel`

- `wxWindow`

- `wxEvtHandler`

wxWidgets docs: wxGrid

# Summary

## Types

wxGrid()

## Functions

appendCols(This)

Equivalent to `appendCols(This, [])`.

appendCols/2

Appends one or more new columns to the right of the grid.

appendRows(This)

Equivalent to `appendRows(This, [])`.

appendRows/2

Appends one or more new rows to the bottom of the grid.

autoSize(This)

Automatically sets the height and width of all rows and columns to fit their contents.

autoSizeColumn(This, Col)

Equivalent to `autoSizeColumn(This, Col, [])`.

autoSizeColumn/3

Automatically sizes the column to fit its contents.

autoSizeColumns(This)

Equivalent to `autoSizeColumns(This, [])`.

autoSizeColumns/2

Automatically sizes all columns to fit their contents.

autoSizeRow(This, Row)

Equivalent to `autoSizeRow(This, Row, [])`.

autoSizeRow/3

Automatically sizes the row to fit its contents.

autoSizeRows(This)

Equivalent to `autoSizeRows(This, [])`.

autoSizeRows/2

Automatically sizes all rows to fit their contents.

beginBatch(This)

Increments the grid's batch count.

blockToDeviceRect(This, TopLeft, BottomRight)

Convert grid cell coordinates to grid window pixel coordinates.

canDragCell(This)

Return true if the dragging of cells is enabled or false otherwise.

canDragColMove(This)

Returns true if columns can be moved by dragging with the mouse.

canDragColSize(This, Col)

Returns true if the given column can be resized by dragging with the mouse.

canDragGridRowEdges(This)

Return true if row edges inside the grid can be dragged to resize the rows.

canDragGridSize(This)

Return true if the dragging of grid lines to resize rows and columns is enabled or false otherwise.

canDragRowSize(This, Row)

Returns true if the given row can be resized by dragging with the mouse.

canEnableCellControl(This)

Returns true if the in-place edit control for the current grid cell can be used and false otherwise.

cellToRect(This, Coords)

Return the rectangle corresponding to the grid cell's size and position in logical coordinates.

cellToRect(This, Row, Col)

Return the rectangle corresponding to the grid cell's size and position in logical coordinates.

clearGrid(This)

Clears all data in the underlying grid table and repaints the grid.

clearSelection(This)

Deselects all cells that are currently selected.

createGrid(This, NumRows, NumCols)

Equivalent to `createGrid(This, NumRows, NumCols, [])`.

createGrid/4

Creates a grid with the specified initial number of rows and columns.

deleteCols(This)

Equivalent to `deleteCols(This, [])`.

deleteCols/2

Deletes one or more columns from a grid starting at the specified position.

deleteRows(This)

Equivalent to `deleteRows(This, [])`.

deleteRows/2

Deletes one or more rows from a grid starting at the specified position.

destroy(This)

Destroys the object

disableCellEditControl(This)

Disables in-place editing of grid cells.

disableDragColSize(This)

Disables column sizing by dragging with the mouse.

disableDragGridSize(This)

Disable mouse dragging of grid lines to resize rows and columns.

disableDragRowSize(This)

Disables row sizing by dragging with the mouse.

enableCellEditControl(This)

Equivalent to `enableCellEditControl(This, [])`.

enableCellEditControl/2

Enables or disables in-place editing of grid cell data.

enableDragColSize(This)

Equivalent to `enableDragColSize(This, [])`.

enableDragColSize/2

Enables or disables column sizing by dragging with the mouse.

enableDragGridSize(This)

Equivalent to `enableDragGridSize(This, [])`.

enableDragGridSize/2

Enables or disables row and column resizing by dragging gridlines with the mouse.

enableDragRowSize(This)

Equivalent to `enableDragRowSize(This, [])`.

enableDragRowSize/2

Enables or disables row sizing by dragging with the mouse.

enableEditing(This, Edit)

Makes the grid globally editable or read-only.

enableGridLines(This)

Equivalent to `enableGridLines(This, [])`.

enableGridLines/2

Turns the drawing of grid lines on or off.

endBatch(This)

Decrements the grid's batch count.

fit(This)

Overridden `wxWindow` method.

forceRefresh(This)

Causes immediate repainting of the grid.

getBatchCount(This)

Returns the number of times that `beginBatch/1` has been called without (yet) matching calls to `endBatch/1`.

getCellAlignment(This, Row, Col)

Sets the arguments to the horizontal and vertical text alignment values for the grid cell at the specified location.

getCellBackgroundColour(This, Row, Col)

Returns the background colour of the cell at the specified location.

getCellEditor(This, Row, Col)

Returns a pointer to the editor for the cell at the specified location.

getCellFont(This, Row, Col)

Returns the font for text in the grid cell at the specified location.

getCellRenderer(This, Row, Col)

Returns a pointer to the renderer for the grid cell at the specified location.

getCellTextColour(This, Row, Col)

Returns the text colour for the grid cell at the specified location.

getCellValue(This, Coords)

Returns the string contained in the cell at the specified location.

getCellValue(This, Row, Col)

Returns the string contained in the cell at the specified location.

getColLabelAlignment(This)

Sets the arguments to the current column label alignment values.

getColLabelSize(This)

Returns the current height of the column labels.

getColLabelValue(This, Col)

Returns the specified column label.

getColMinimalAcceptableWidth(This)

Returns the minimal width to which a column may be resized.

getDefaultCellAlignment(This)

Returns the default cell alignment.

getDefaultCellBackgroundColour(This)

Returns the current default background colour for grid cells.

getDefaultCellFont(This)

Returns the current default font for grid cell text.

getDefaultCellTextColour(This)

Returns the current default colour for grid cell text.

getDefaultColLabelSize(This)

Returns the default height for column labels.

getDefaultColSize(This)

Returns the current default width for grid columns.

getDefaultEditor(This)

Returns a pointer to the current default grid cell editor.

getDefaultEditorForCell(This, C)

Returns the default editor for the specified cell.

getDefaultEditorForCell(This, Row, Col)

Returns the default editor for the specified cell.

getDefaultEditorForType(This, TypeName)

Returns the default editor for the cells containing values of the given type.

getDefaultRenderer(This)

Returns a pointer to the current default grid cell renderer.

getDefaultRendererForCell(This, Row, Col)

Returns the default renderer for the given cell.

getDefaultRendererForType(This, TypeName)

Returns the default renderer for the cell containing values of the given type.

getDefaultRowLabelSize(This)

Returns the default width for the row labels.

getDefaultRowSize(This)

Returns the current default height for grid rows.

getGridColLabelWindow(This)

Return the column labels window.

getGridCornerLabelWindow(This)

Return the window in the top left grid corner.

getGridCursorCol(This)

Returns the current grid cell column position.

getGridCursorRow(This)

Returns the current grid cell row position.

getGridLineColour(This)

Returns the colour used for grid lines.

getGridRowLabelWindow(This)

Return the row labels window.

getGridWindow(This)

Return the main grid window containing the grid cells.

getLabelBackgroundColour(This)

Returns the colour used for the background of row and column labels.

getLabelFont(This)

Returns the font used for row and column labels.

getLabelTextColour(This)

Returns the colour used for row and column label text.

getNumberCols(This)

Returns the total number of grid columns.

getNumberRows(This)

Returns the total number of grid rows.

getOrCreateCellAttr(This, Row, Col)

Returns the attribute for the given cell creating one if necessary.

getRowLabelAlignment(This)

Returns the alignment used for row labels.

getRowLabelSize(This)

Returns the current width of the row labels.

getRowLabelValue(This, Row)

Returns the specified row label.

getRowMinimalAcceptableHeight(This)

Returns the minimal size to which rows can be resized.

getRowSize(This, Row)

Returns the height of the specified row.

getScrollLineX(This)

Returns the number of pixels per horizontal scroll increment.

getScrollLineY(This)

Returns the number of pixels per vertical scroll increment.

getSelectedCells(This)

Returns an array of individually selected cells.

getSelectedCols(This)

Returns an array of selected columns.

getSelectedRows(This)

Returns an array of selected rows.

getSelectionBackground(This)

Returns the colour used for drawing the selection background.

getSelectionBlockBottomRight(This)

Returns an array of the bottom right corners of blocks of selected cells.

getSelectionBlockTopLeft(This)

Returns an array of the top left corners of blocks of selected cells.

getSelectionForeground(This)

Returns the colour used for drawing the selection foreground.

gridLinesEnabled(This)

Returns true if drawing of grid lines is turned on, false otherwise.

hideCellEditControl(This)

Hides the in-place cell edit control.

insertCols(This)

Equivalent to `insertCols(This, [])`.

insertCols/2

Inserts one or more new columns into a grid with the first new column at the specified position.

insertRows(This)

Equivalent to `insertRows(This, [])`.

insertRows/2

Inserts one or more new rows into a grid with the first new row at the specified position.

isCellEditControlEnabled(This)

Returns true if the in-place edit control is currently enabled.

isCurrentCellReadOnly(This)

Returns true if the current cell is read-only.

isEditable(This)

Returns false if the whole grid has been set as read-only or true otherwise.

isInSelection(This, Coords)

Returns true if the given cell is selected.

isInSelection(This, Row, Col)

Returns true if the given cell is selected.

isReadOnly(This, Row, Col)

Returns true if the cell at the specified location can't be edited.

isSelection(This)

Returns true if there are currently any selected cells, rows, columns or blocks.

isVisible(This, Coords)

Equivalent to `isVisible(This, Coords, [])`.

isVisible/3

Returns true if a cell is either entirely or at least partially visible in the grid window.

isVisible/4

Returns true if a cell is either entirely or at least partially visible in the grid window.

makeCellVisible(This, Coords)

Brings the specified cell into the visible grid cell area with minimal scrolling.

makeCellVisible(This, Row, Col)

Brings the specified cell into the visible grid cell area with minimal scrolling.

moveCursorDown(This, ExpandSelection)

Moves the grid cursor down by one row.

moveCursorDownBlock(This, 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(This, ExpandSelection)

Moves the grid cursor left by one column.

moveCursorLeftBlock(This, 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(This, ExpandSelection)

Moves the grid cursor right by one column.

moveCursorRightBlock(This, 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(This, ExpandSelection)

Moves the grid cursor up by one row.

moveCursorUpBlock(This, 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(This)

Moves the grid cursor down by some number of rows so that the previous bottom visible row becomes the top visible row.

movePageUp(This)

Moves the grid cursor up by some number of rows so that the previous top visible row becomes the bottom visible row.

new()

Default constructor.

new(Parent, Id)

Equivalent to `new(Parent, Id, [])`.

new/3

Constructor creating the grid window.

registerDataType(This, TypeName, Renderer, Editor)

Register a new data type.

saveEditControlValue(This)

Sets the value of the current grid cell to the current in-place edit control value.

selectAll(This)

Selects all cells in the grid.

selectBlock(This, TopLeft, BottomRight)

Equivalent to `selectBlock(This, TopLeft, BottomRight, [])`.

selectBlock/4

Selects a rectangular block of cells.

selectBlock(This, TopRow, LeftCol, BottomRow, RightCol)

Equivalent to `selectBlock(This, TopRow, LeftCol, BottomRow, RightCol, [])`.

selectBlock/6

Selects a rectangular block of cells.

selectCol(This, Col)

Equivalent to `selectCol(This, Col, [])`.

selectCol/3

Selects the specified column.

selectRow(This, Row)

Equivalent to `selectRow(This, Row, [])`.

selectRow/3

Selects the specified row.

setCellAlignment(This, Row, Col, Horiz, Vert)

Sets the horizontal and vertical alignment for grid cell text at the specified location.

setCellBackgroundColour(This, Row, Col, Colour)

Set the background colour for the given cell or all cells by default.

setCellEditor(This, Row, Col, Editor)

Sets the editor for the grid cell at the specified location.

setCellFont(This, Row, Col, Font)

Sets the font for text in the grid cell at the specified location.

setCellRenderer(This, Row, Col, Renderer)

Sets the renderer for the grid cell at the specified location.

setCellTextColour(This, Row, Col, Colour)

Sets the text colour for the given cell.

setCellValue(This, Coords, S)

Sets the string value for the cell at the specified location.

setCellValue(This, Row, Col, S)

Sets the string value for the cell at the specified location.

setColAttr(This, Col, Attr)

Sets the cell attributes for all cells in the specified column.

setColFormatBool(This, Col)

Sets the specified column to display boolean values.

setColFormatCustom(This, Col, TypeName)

Sets the specified column to display data in a custom format.

setColFormatFloat(This, Col)

Equivalent to `setColFormatFloat(This, Col, [])`.

setColFormatFloat/3

Sets the specified column to display floating point values with the given width and precision.

setColFormatNumber(This, Col)

Sets the specified column to display integer values.

setColLabelAlignment(This, Horiz, Vert)

Sets the horizontal and vertical alignment of column label text.

setColLabelSize(This, Height)

Sets the height of the column labels.

setColLabelValue(This, Col, Value)

Set the value for the given column label.

setColMinimalAcceptableWidth(This, Width)

Sets the minimal `width` to which the user can resize columns.

setColMinimalWidth(This, Col, Width)

Sets the minimal `width` for the specified column `col`.

setColSize(This, Col, Width)

Sets the width of the specified column.

setDefaultCellAlignment(This, Horiz, Vert)

Sets the default horizontal and vertical alignment for grid cell text.

setDefaultCellBackgroundColour(This, Colour)

Sets the default background colour for grid cells.

setDefaultCellFont(This, Font)

Sets the default font to be used for grid cell text.

setDefaultCellTextColour(This, Colour)

Sets the current default colour for grid cell text.

setDefaultColSize(This, Width)

Equivalent to `setDefaultColSize(This, Width, [])`.

setDefaultColSize/3

Sets the default width for columns in the grid.

setDefaultEditor(This, Editor)

Sets the default editor for grid cells.

setDefaultRenderer(This, Renderer)

Sets the default renderer for grid cells.

setDefaultRowSize(This, Height)

Equivalent to `setDefaultRowSize(This, Height, [])`.

setDefaultRowSize/3

Sets the default height for rows in the grid.

setGridCursor(This, Coords)

Set the grid cursor to the specified cell.

setGridCursor(This, Row, Col)

Set the grid cursor to the specified cell.

setGridLineColour(This, Colour)

Sets the colour used to draw grid lines.

setLabelBackgroundColour(This, Colour)

Sets the background colour for row and column labels.

setLabelFont(This, Font)

Sets the font for row and column labels.

setLabelTextColour(This, Colour)

Sets the colour for row and column label text.

setMargins(This, ExtraWidth, ExtraHeight)

Sets the extra margins used around the grid area.

setReadOnly(This, Row, Col)

Equivalent to `setReadOnly(This, Row, Col, [])`.

setReadOnly/4

Makes the cell at the specified location read-only or editable.

setRowAttr(This, Row, Attr)

Sets the cell attributes for all cells in the specified row.

setRowLabelAlignment(This, Horiz, Vert)

Sets the horizontal and vertical alignment of row label text.

setRowLabelSize(This, Width)

Sets the width of the row labels.

setRowLabelValue(This, Row, Value)

Sets the value for the given row label.

setRowMinimalAcceptableHeight(This, Height)

Sets the minimal row `height` used by default.

setRowMinimalHeight(This, Row, Height)

Sets the minimal `height` for the specified `row`.

setRowSize(This, Row, Height)

Sets the height of the specified row.

setScrollLineX(This, X)

Sets the number of pixels per horizontal scroll increment.

setScrollLineY(This, Y)

Sets the number of pixels per vertical scroll increment.

setSelectionBackground(This, C)

Set the colour to be used for drawing the selection background.

setSelectionForeground(This, C)

Set the colour to be used for drawing the selection foreground.

setSelectionMode(This, Selmode)

Set the selection behaviour of the grid.

showCellEditControl(This)

Displays the active in-place cell edit control for the current cell after it was hidden.

xToCol(This, X)

Equivalent to `xToCol(This, X, [])`.

xToCol/3

Returns the column at the given pixel position depending on the window.

xToEdgeOfCol(This, X)

Returns the column whose right hand edge is close to the given logical `x` position.

yToEdgeOfRow(This, Y)

Returns the row whose bottom edge is close to the given logical `y` position.

yToRow(This, Y)

Equivalent to `yToRow(This, Y, [])`.

yToRow/3

Returns the grid row that corresponds to the logical `y` coordinate.

# Types

# wxGrid()

    -type wxGrid() :: wx:wx_object().

# Functions

# appendCols(This)

    -spec appendCols(This) -> boolean() when This :: wxGrid().

Equivalent to `appendCols(This, [])`.

# appendCols/2

    -spec appendCols(This, [Option]) -> boolean()
                        when This :: wxGrid(), Option :: {numCols, integer()} | {updateLabels, boolean()}.

Appends one or more new columns to the right of the grid.

The `updateLabels` argument is not used at present. If you are using a derived grid table class you will need to override `wxGridTableBase::AppendCols()` (not implemented in wx). See `insertCols/2` for further information.

Return: true on success or false if appending columns failed.

# appendRows(This)

    -spec appendRows(This) -> boolean() when This :: wxGrid().

Equivalent to `appendRows(This, [])`.

# appendRows/2

    -spec appendRows(This, [Option]) -> boolean()
                        when This :: wxGrid(), Option :: {numRows, integer()} | {updateLabels, boolean()}.

Appends one or more new rows to the bottom of the grid.

The `updateLabels` argument is not used at present. If you are using a derived grid table class you will need to override `wxGridTableBase::AppendRows()` (not implemented in wx). See `insertRows/2` for further information.

Return: true on success or false if appending rows failed.

# autoSize(This)

    -spec autoSize(This) -> ok when This :: wxGrid().

Automatically sets the height and width of all rows and columns to fit their contents.

# autoSizeColumn(This, Col)

    -spec autoSizeColumn(This, Col) -> ok when This :: wxGrid(), Col :: integer().

Equivalent to `autoSizeColumn(This, Col, [])`.

# autoSizeColumn/3

    -spec autoSizeColumn(This, Col, [Option]) -> ok
                            when This :: wxGrid(), Col :: integer(), Option :: {setAsMin, boolean()}.

Automatically sizes the column to fit its contents.

If `setAsMin` is true the calculated width will also be set as the minimal width for the column.

# autoSizeColumns(This)

    -spec autoSizeColumns(This) -> ok when This :: wxGrid().

Equivalent to `autoSizeColumns(This, [])`.

# autoSizeColumns/2

    -spec autoSizeColumns(This, [Option]) -> ok when This :: wxGrid(), Option :: {setAsMin, boolean()}.

Automatically sizes all columns to fit their contents.

If `setAsMin` is true the calculated widths will also be set as the minimal widths for the columns.

# autoSizeRow(This, Row)

    -spec autoSizeRow(This, Row) -> ok when This :: wxGrid(), Row :: integer().

Equivalent to `autoSizeRow(This, Row, [])`.

# autoSizeRow/3

    -spec autoSizeRow(This, Row, [Option]) -> ok
                         when This :: wxGrid(), Row :: integer(), Option :: {setAsMin, boolean()}.

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.

# autoSizeRows(This)

    -spec autoSizeRows(This) -> ok when This :: wxGrid().

Equivalent to `autoSizeRows(This, [])`.

# autoSizeRows/2

    -spec autoSizeRows(This, [Option]) -> ok when This :: wxGrid(), Option :: {setAsMin, boolean()}.

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.

# beginBatch(This)

    -spec beginBatch(This) -> ok when This :: wxGrid().

Increments the grid's batch count.

When the count is greater than zero repainting of the grid is suppressed. Each call to BeginBatch must be matched by a later call to `endBatch/1`. Code that does a lot of grid modification can be enclosed between `beginBatch/1` and `endBatch/1` calls to avoid screen flicker. The final `endBatch/1` call will cause the grid to be repainted.

Notice that you should use `wxGridUpdateLocker` (not implemented in wx) which ensures that there is always a matching `endBatch/1` call for this `beginBatch/1` if possible instead of calling this method directly.

# blockToDeviceRect(This, TopLeft, BottomRight)

    -spec blockToDeviceRect(This, TopLeft, BottomRight) ->
                               {X :: integer(), Y :: integer(), W :: integer(), H :: integer()}
                               when
                                   This :: wxGrid(),
                                   TopLeft :: {R :: integer(), C :: integer()},
                                   BottomRight :: {R :: integer(), C :: integer()}.

Convert grid cell coordinates to grid window pixel coordinates.

This function returns the rectangle that encloses the block of cells limited by `topLeft` and `bottomRight` cell in device coords and clipped to the client size of the grid window.

Since: 3.1.3 Parameter `gridWindow` has been added.

See: `cellToRect/3`

# canDragCell(This)

    -spec canDragCell(This) -> boolean() when This :: wxGrid().

Return true if the dragging of cells is enabled or false otherwise.

# canDragColMove(This)

    -spec canDragColMove(This) -> boolean() when This :: wxGrid().

Returns true if columns can be moved by dragging with the mouse.

Columns can be moved by dragging on their labels.

# canDragColSize(This, Col)

    -spec canDragColSize(This, Col) -> boolean() when This :: wxGrid(), Col :: integer().

Returns true if the given column can be resized by dragging with the mouse.

This function returns true if resizing the columns interactively is globally enabled, i.e. if `disableDragColSize/1` hadn't been called, and if this column wasn't explicitly marked as non-resizable with `DisableColResize()` (not implemented in wx).

# canDragGridRowEdges(This)

    -spec canDragGridRowEdges(This) -> boolean() when This :: wxGrid().

Return true if row edges inside the grid can be dragged to resize the rows.

See:

- `canDragGridSize/1`

- `canDragRowSize/2`

Since: 3.1.4

# canDragGridSize(This)

    -spec canDragGridSize(This) -> boolean() when This :: wxGrid().

Return true if the dragging of grid lines to resize rows and columns is enabled or false otherwise.

# canDragRowSize(This, Row)

    -spec canDragRowSize(This, Row) -> boolean() when This :: wxGrid(), Row :: integer().

Returns true if the given row can be resized by dragging with the mouse.

This is the same as `canDragColSize/2` but for rows.

# canEnableCellControl(This)

    -spec canEnableCellControl(This) -> boolean() when This :: wxGrid().

Returns true if the in-place edit control for the current grid cell can be used and false otherwise.

This function always returns false for the read-only cells.

# cellToRect(This, Coords)

    -spec cellToRect(This, Coords) -> {X :: integer(), Y :: integer(), W :: integer(), H :: integer()}
                        when This :: wxGrid(), Coords :: {R :: integer(), C :: integer()}.

Return the rectangle corresponding to the grid cell's size and position in logical coordinates.

See: `blockToDeviceRect/3`

# cellToRect(This, Row, Col)

    -spec cellToRect(This, Row, Col) -> {X :: integer(), Y :: integer(), W :: integer(), H :: integer()}
                        when This :: wxGrid(), Row :: integer(), Col :: integer().

Return the rectangle corresponding to the grid cell's size and position in logical coordinates.

See: `blockToDeviceRect/3`

# clearGrid(This)

    -spec clearGrid(This) -> ok when This :: wxGrid().

Clears all data in the underlying grid table and repaints the grid.

The table is not deleted by this function. If you are using a derived table class then you need to override `wxGridTableBase::Clear()` (not implemented in wx) for this function to have any effect.

# clearSelection(This)

    -spec clearSelection(This) -> ok when This :: wxGrid().

Deselects all cells that are currently selected.

# createGrid(This, NumRows, NumCols)

    -spec createGrid(This, NumRows, NumCols) -> boolean()
                        when This :: wxGrid(), NumRows :: integer(), NumCols :: integer().

Equivalent to `createGrid(This, NumRows, NumCols, [])`.

# createGrid/4

    -spec createGrid(This, NumRows, NumCols, [Option]) -> boolean()
                        when
                            This :: wxGrid(),
                            NumRows :: integer(),
                            NumCols :: integer(),
                            Option :: {selmode, wx:wx_enum()}.

Creates a grid with the specified initial number of rows and columns.

Call this directly after the grid constructor. When you use this function `wxGrid` will create and manage a simple table of string values for you. All of the grid data will be stored in memory.

For applications with more complex data types or relationships, or for dealing with very large datasets, you should derive your own grid table class and pass a table object to the grid with `SetTable()` (not implemented in wx) or `AssignTable()` (not implemented in wx).

# deleteCols(This)

    -spec deleteCols(This) -> boolean() when This :: wxGrid().

Equivalent to `deleteCols(This, [])`.

# deleteCols/2

    -spec deleteCols(This, [Option]) -> boolean()
                        when
                            This :: wxGrid(),
                            Option :: {pos, integer()} | {numCols, integer()} | {updateLabels, boolean()}.

Deletes one or more columns from a grid starting at the specified position.

The `updateLabels` argument is not used at present. If you are using a derived grid table class you will need to override `wxGridTableBase::DeleteCols()` (not implemented in wx). See `insertCols/2` for further information.

Return: true on success or false if deleting columns failed.

# deleteRows(This)

    -spec deleteRows(This) -> boolean() when This :: wxGrid().

Equivalent to `deleteRows(This, [])`.

# deleteRows/2

    -spec deleteRows(This, [Option]) -> boolean()
                        when
                            This :: wxGrid(),
                            Option :: {pos, integer()} | {numRows, integer()} | {updateLabels, boolean()}.

Deletes one or more rows from a grid starting at the specified position.

The `updateLabels` argument is not used at present. If you are using a derived grid table class you will need to override `wxGridTableBase::DeleteRows()` (not implemented in wx). See `insertRows/2` for further information.

Return: true on success or false if deleting rows failed.

# destroy(This)

    -spec destroy(This :: wxGrid()) -> ok.

Destroys the object

# disableCellEditControl(This)

    -spec disableCellEditControl(This) -> ok when This :: wxGrid().

Disables in-place editing of grid cells.

Equivalent to calling EnableCellEditControl(false).

# disableDragColSize(This)

    -spec disableDragColSize(This) -> ok when This :: wxGrid().

Disables column sizing by dragging with the mouse.

Equivalent to passing false to `enableDragColSize/2`.

# disableDragGridSize(This)

    -spec disableDragGridSize(This) -> ok when This :: wxGrid().

Disable mouse dragging of grid lines to resize rows and columns.

Equivalent to passing false to `enableDragGridSize/2`

# disableDragRowSize(This)

    -spec disableDragRowSize(This) -> ok when This :: wxGrid().

Disables row sizing by dragging with the mouse.

Equivalent to passing false to `enableDragRowSize/2`.

# enableCellEditControl(This)

    -spec enableCellEditControl(This) -> ok when This :: wxGrid().

Equivalent to `enableCellEditControl(This, [])`.

# enableCellEditControl/2

    -spec enableCellEditControl(This, [Option]) -> ok when This :: wxGrid(), Option :: {enable, boolean()}.

Enables or disables in-place editing of grid cell data.

Enabling in-place editing generates `wxEVT_GRID_EDITOR_SHOWN` and, if it isn't vetoed by the application, shows the in-place editor which allows the user to change the cell value.

Disabling in-place editing does nothing if the in-place editor isn't currently shown, otherwise the `wxEVT_GRID_EDITOR_HIDDEN` event is generated but, unlike the "shown" event, it can't be vetoed and the in-place editor is dismissed unconditionally.

Note that it is an error to call this function if the current cell is read-only, use `canEnableCellControl/1` to check for this precondition.

# enableDragColSize(This)

    -spec enableDragColSize(This) -> ok when This :: wxGrid().

Equivalent to `enableDragColSize(This, [])`.

# enableDragColSize/2

    -spec enableDragColSize(This, [Option]) -> ok when This :: wxGrid(), Option :: {enable, boolean()}.

Enables or disables column sizing by dragging with the mouse.

# enableDragGridSize(This)

    -spec enableDragGridSize(This) -> ok when This :: wxGrid().

Equivalent to `enableDragGridSize(This, [])`.

# enableDragGridSize/2

    -spec enableDragGridSize(This, [Option]) -> ok when This :: wxGrid(), Option :: {enable, boolean()}.

Enables or disables row and column resizing by dragging gridlines with the mouse.

# enableDragRowSize(This)

    -spec enableDragRowSize(This) -> ok when This :: wxGrid().

Equivalent to `enableDragRowSize(This, [])`.

# enableDragRowSize/2

    -spec enableDragRowSize(This, [Option]) -> ok when This :: wxGrid(), Option :: {enable, boolean()}.

Enables or disables row sizing by dragging with the mouse.

# enableEditing(This, Edit)

    -spec enableEditing(This, Edit) -> ok when This :: wxGrid(), Edit :: boolean().

Makes the grid globally editable or read-only.

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 `wxGridCellAttr:setReadOnly/2`. For single cells you can also use the shortcut function `setReadOnly/4`.

For more information about controlling grid cell attributes see the `wxGridCellAttr` class and the overview_grid.

# enableGridLines(This)

    -spec enableGridLines(This) -> ok when This :: wxGrid().

Equivalent to `enableGridLines(This, [])`.

# enableGridLines/2

    -spec enableGridLines(This, [Option]) -> ok when This :: wxGrid(), Option :: {enable, boolean()}.

Turns the drawing of grid lines on or off.

# endBatch(This)

    -spec endBatch(This) -> ok when This :: wxGrid().

Decrements the grid's batch count.

When the count is greater than zero repainting of the grid is suppressed. Each previous call to `beginBatch/1` must be matched by a later call to `endBatch/1`. Code that does a lot of grid modification can be enclosed between `beginBatch/1` and `endBatch/1` calls to avoid screen flicker. The final `endBatch/1` will cause the grid to be repainted.

# fit(This)

    -spec fit(This) -> ok when This :: wxGrid().

Overridden `wxWindow` method.

# forceRefresh(This)

    -spec forceRefresh(This) -> ok when This :: wxGrid().

Causes immediate repainting of the grid.

Use this instead of the usual `wxWindow:refresh/2`.

# getBatchCount(This)

    -spec getBatchCount(This) -> integer() when This :: wxGrid().

Returns the number of times that `beginBatch/1` has been called without (yet) matching calls to `endBatch/1`.

While the grid's batch count is greater than zero the display will not be updated.

# getCellAlignment(This, Row, Col)

    -spec getCellAlignment(This, Row, Col) -> {Horiz :: integer(), Vert :: integer()}
                              when This :: wxGrid(), Row :: integer(), Col :: integer().

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`.

# getCellBackgroundColour(This, Row, Col)

    -spec getCellBackgroundColour(This, Row, Col) -> wx:wx_colour4()
                                     when This :: wxGrid(), Row :: integer(), Col :: integer().

Returns the background colour of the cell at the specified location.

# getCellEditor(This, Row, Col)

    -spec getCellEditor(This, Row, Col) -> wxGridCellEditor:wxGridCellEditor()
                           when This :: wxGrid(), Row :: integer(), Col :: integer().

Returns a pointer to the editor for the cell at the specified location.

See `wxGridCellEditor` and the overview_grid for more information about cell editors and renderers.

The caller must call DecRef() on the returned pointer.

# getCellFont(This, Row, Col)

    -spec getCellFont(This, Row, Col) -> wxFont:wxFont()
                         when This :: wxGrid(), Row :: integer(), Col :: integer().

Returns the font for text in the grid cell at the specified location.

# getCellRenderer(This, Row, Col)

    -spec getCellRenderer(This, Row, Col) -> wxGridCellRenderer:wxGridCellRenderer()
                             when This :: wxGrid(), Row :: integer(), Col :: integer().

Returns a pointer to the renderer for the grid cell at the specified location.

See `wxGridCellRenderer` and the overview_grid for more information about cell editors and renderers.

The caller must call DecRef() on the returned pointer.

# getCellTextColour(This, Row, Col)

    -spec getCellTextColour(This, Row, Col) -> wx:wx_colour4()
                               when This :: wxGrid(), Row :: integer(), Col :: integer().

Returns the text colour for the grid cell at the specified location.

# getCellValue(This, Coords)

    -spec getCellValue(This, Coords) -> unicode:charlist()
                          when This :: wxGrid(), Coords :: {R :: integer(), C :: integer()}.

Returns the string contained in the cell at the specified location.

For simple applications where a grid object automatically uses a default grid table of string values you use this function together with `setCellValue/4` to access cell values. For more complex applications where you have derived your own grid table class that contains various data types (e.g. numeric, boolean or user-defined custom types) then you only use this function for those cells that contain string values.

See `wxGridTableBase::CanGetValueAs()` (not implemented in wx) and the overview_grid for more information.

# getCellValue(This, Row, Col)

    -spec getCellValue(This, Row, Col) -> unicode:charlist()
                          when This :: wxGrid(), Row :: integer(), Col :: integer().

Returns the string contained in the cell at the specified location.

For simple applications where a grid object automatically uses a default grid table of string values you use this function together with `setCellValue/4` to access cell values. For more complex applications where you have derived your own grid table class that contains various data types (e.g. numeric, boolean or user-defined custom types) then you only use this function for those cells that contain string values.

See `wxGridTableBase::CanGetValueAs()` (not implemented in wx) and the overview_grid for more information.

# getColLabelAlignment(This)

    -spec getColLabelAlignment(This) -> {Horiz :: integer(), Vert :: integer()} when This :: wxGrid().

Sets the arguments to the current column label alignment values.

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`.

# getColLabelSize(This)

    -spec getColLabelSize(This) -> integer() when This :: wxGrid().

Returns the current height of the column labels.

# getColLabelValue(This, Col)

    -spec getColLabelValue(This, Col) -> unicode:charlist() when This :: wxGrid(), Col :: integer().

Returns the specified column label.

The default grid table class provides column labels of the form A,B...Z,AA,AB...ZZ,AAA... If you are using a custom grid table you can override `wxGridTableBase::GetColLabelValue()` (not implemented in wx) to provide your own labels.

# getColMinimalAcceptableWidth(This)

    -spec getColMinimalAcceptableWidth(This) -> integer() when This :: wxGrid().

Returns the minimal width to which a column may be resized.

Use `setColMinimalAcceptableWidth/2` to change this value globally or `setColMinimalWidth/3` to do it for individual columns.

See: `getRowMinimalAcceptableHeight/1`

# getDefaultCellAlignment(This)

    -spec getDefaultCellAlignment(This) -> {Horiz :: integer(), Vert :: integer()} when This :: wxGrid().

Returns the default cell alignment.

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`.

See: `setDefaultCellAlignment/3`

# getDefaultCellBackgroundColour(This)

    -spec getDefaultCellBackgroundColour(This) -> wx:wx_colour4() when This :: wxGrid().

Returns the current default background colour for grid cells.

# getDefaultCellFont(This)

    -spec getDefaultCellFont(This) -> wxFont:wxFont() when This :: wxGrid().

Returns the current default font for grid cell text.

# getDefaultCellTextColour(This)

    -spec getDefaultCellTextColour(This) -> wx:wx_colour4() when This :: wxGrid().

Returns the current default colour for grid cell text.

# getDefaultColLabelSize(This)

    -spec getDefaultColLabelSize(This) -> integer() when This :: wxGrid().

Returns the default height for column labels.

# getDefaultColSize(This)

    -spec getDefaultColSize(This) -> integer() when This :: wxGrid().

Returns the current default width for grid columns.

# getDefaultEditor(This)

    -spec getDefaultEditor(This) -> wxGridCellEditor:wxGridCellEditor() when This :: wxGrid().

Returns a pointer to the current default grid cell editor.

See `wxGridCellEditor` and the overview_grid for more information about cell editors and renderers.

# getDefaultEditorForCell(This, C)

    -spec getDefaultEditorForCell(This, C) -> wxGridCellEditor:wxGridCellEditor()
                                     when This :: wxGrid(), C :: {R :: integer(), C :: integer()}.

Returns the default editor for the specified cell.

The base class version returns the editor appropriate for the current cell type but this method may be overridden in the derived classes to use custom editors for some cells by default.

Notice that the same may be achieved in a usually simpler way by associating a custom editor with the given cell or cells.

The caller must call DecRef() on the returned pointer.

# getDefaultEditorForCell(This, Row, Col)

    -spec getDefaultEditorForCell(This, Row, Col) -> wxGridCellEditor:wxGridCellEditor()
                                     when This :: wxGrid(), Row :: integer(), Col :: integer().

Returns the default editor for the specified cell.

The base class version returns the editor appropriate for the current cell type but this method may be overridden in the derived classes to use custom editors for some cells by default.

Notice that the same may be achieved in a usually simpler way by associating a custom editor with the given cell or cells.

The caller must call DecRef() on the returned pointer.

# getDefaultEditorForType(This, TypeName)

    -spec getDefaultEditorForType(This, TypeName) -> wxGridCellEditor:wxGridCellEditor()
                                     when This :: wxGrid(), TypeName :: unicode:chardata().

Returns the default editor for the cells containing values of the given type.

The base class version returns the editor which was associated with the specified `typeName` when it was registered `registerDataType/4` but this function may be overridden to return something different. This allows overriding an editor used for one of the standard types.

The caller must call DecRef() on the returned pointer.

# getDefaultRenderer(This)

    -spec getDefaultRenderer(This) -> wxGridCellRenderer:wxGridCellRenderer() when This :: wxGrid().

Returns a pointer to the current default grid cell renderer.

See `wxGridCellRenderer` and the overview_grid for more information about cell editors and renderers.

The caller must call DecRef() on the returned pointer.

# getDefaultRendererForCell(This, Row, Col)

    -spec getDefaultRendererForCell(This, Row, Col) -> wxGridCellRenderer:wxGridCellRenderer()
                                       when This :: wxGrid(), Row :: integer(), Col :: integer().

Returns the default renderer for the given cell.

The base class version returns the renderer appropriate for the current cell type but this method may be overridden in the derived classes to use custom renderers for some cells by default.

The caller must call DecRef() on the returned pointer.

# getDefaultRendererForType(This, TypeName)

    -spec getDefaultRendererForType(This, TypeName) -> wxGridCellRenderer:wxGridCellRenderer()
                                       when This :: wxGrid(), TypeName :: unicode:chardata().

Returns the default renderer for the cell containing values of the given type.

See: `getDefaultEditorForType/2`

# getDefaultRowLabelSize(This)

    -spec getDefaultRowLabelSize(This) -> integer() when This :: wxGrid().

Returns the default width for the row labels.

# getDefaultRowSize(This)

    -spec getDefaultRowSize(This) -> integer() when This :: wxGrid().

Returns the current default height for grid rows.

# getGridColLabelWindow(This)

    -spec getGridColLabelWindow(This) -> wxWindow:wxWindow() when This :: wxGrid().

Return the column labels window.

This window is not shown if the columns labels were hidden using `HideColLabels()` (not implemented in wx).

Depending on whether `UseNativeColHeader()` (not implemented in wx) was called or not this can be either a `wxHeaderCtrl` (not implemented in wx) or a plain `wxWindow`. This function returns a valid window pointer in either case but in the former case you can also use `GetGridColHeader()` (not implemented in wx) to access it if you need wxHeaderCtrl-specific functionality.

# getGridCornerLabelWindow(This)

    -spec getGridCornerLabelWindow(This) -> wxWindow:wxWindow() when This :: wxGrid().

Return the window in the top left grid corner.

This window is shown only of both columns and row labels are shown and normally doesn't contain anything. Clicking on it is handled by `wxGrid` however and can be used to select the entire grid.

# getGridCursorCol(This)

    -spec getGridCursorCol(This) -> integer() when This :: wxGrid().

Returns the current grid cell column position.

# getGridCursorRow(This)

    -spec getGridCursorRow(This) -> integer() when This :: wxGrid().

Returns the current grid cell row position.

# getGridLineColour(This)

    -spec getGridLineColour(This) -> wx:wx_colour4() when This :: wxGrid().

Returns the colour used for grid lines.

# getGridRowLabelWindow(This)

    -spec getGridRowLabelWindow(This) -> wxWindow:wxWindow() when This :: wxGrid().

Return the row labels window.

This window is not shown if the row labels were hidden using `HideRowLabels()` (not implemented in wx).

# getGridWindow(This)

    -spec getGridWindow(This) -> wxWindow:wxWindow() when This :: wxGrid().

Return the main grid window containing the grid cells.

This window is always shown.

# getLabelBackgroundColour(This)

    -spec getLabelBackgroundColour(This) -> wx:wx_colour4() when This :: wxGrid().

Returns the colour used for the background of row and column labels.

# getLabelFont(This)

    -spec getLabelFont(This) -> wxFont:wxFont() when This :: wxGrid().

Returns the font used for row and column labels.

# getLabelTextColour(This)

    -spec getLabelTextColour(This) -> wx:wx_colour4() when This :: wxGrid().

Returns the colour used for row and column label text.

# getNumberCols(This)

    -spec getNumberCols(This) -> integer() when This :: wxGrid().

Returns the total number of grid columns.

This is the same as the number of columns in the underlying grid table.

# getNumberRows(This)

    -spec getNumberRows(This) -> integer() when This :: wxGrid().

Returns the total number of grid rows.

This is the same as the number of rows in the underlying grid table.

# getOrCreateCellAttr(This, Row, Col)

    -spec getOrCreateCellAttr(This, Row, Col) -> wxGridCellAttr:wxGridCellAttr()
                                 when This :: wxGrid(), Row :: integer(), Col :: integer().

Returns the attribute for the given cell creating one if necessary.

If the cell already has an attribute, it is returned. Otherwise a new attribute is created, associated with the cell and returned. In any case the caller must call DecRef() on the returned pointer.

Prefer to use `GetOrCreateCellAttrPtr()` (not implemented in wx) to avoid the need to call DecRef() on the returned pointer.

This function may only be called if `CanHaveAttributes()` (not implemented in wx) returns true.

# getRowLabelAlignment(This)

    -spec getRowLabelAlignment(This) -> {Horiz :: integer(), Vert :: integer()} when This :: wxGrid().

Returns the alignment used for row labels.

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`.

# getRowLabelSize(This)

    -spec getRowLabelSize(This) -> integer() when This :: wxGrid().

Returns the current width of the row labels.

# getRowLabelValue(This, Row)

    -spec getRowLabelValue(This, Row) -> unicode:charlist() when This :: wxGrid(), Row :: integer().

Returns the specified row label.

The default grid table class provides numeric row labels. If you are using a custom grid table you can override `wxGridTableBase::GetRowLabelValue()` (not implemented in wx) to provide your own labels.

# getRowMinimalAcceptableHeight(This)

    -spec getRowMinimalAcceptableHeight(This) -> integer() when This :: wxGrid().

Returns the minimal size to which rows can be resized.

Use `setRowMinimalAcceptableHeight/2` to change this value globally or `setRowMinimalHeight/3` to do it for individual cells.

See: `getColMinimalAcceptableWidth/1`

# getRowSize(This, Row)

    -spec getRowSize(This, Row) -> integer() when This :: wxGrid(), Row :: integer().

Returns the height of the specified row.

# getScrollLineX(This)

    -spec getScrollLineX(This) -> integer() when This :: wxGrid().

Returns the number of pixels per horizontal scroll increment.

The default is 15.

See:

- `getScrollLineY/1`

- `setScrollLineX/2`

- `setScrollLineY/2`

# getScrollLineY(This)

    -spec getScrollLineY(This) -> integer() when This :: wxGrid().

Returns the number of pixels per vertical scroll increment.

The default is 15.

See:

- `getScrollLineX/1`

- `setScrollLineX/2`

- `setScrollLineY/2`

# getSelectedCells(This)

    -spec getSelectedCells(This) -> [{R :: integer(), C :: integer()}] when This :: wxGrid().

Returns an array of individually selected cells.

Notice that this array does `not` contain all the selected cells in general as it doesn't include the cells selected as part of column, row or block selection. You must use this method, `getSelectedCols/1`, `getSelectedRows/1` and `getSelectionBlockTopLeft/1` and `getSelectionBlockBottomRight/1` methods to obtain the entire selection in general.

Please notice this behaviour is by design and is needed in order to support grids of arbitrary size (when an entire column is selected in a grid with a million of columns, we don't want to create an array with a million of entries in this function, instead it returns an empty array and `getSelectedCols/1` returns an array containing one element).

The function can be slow for the big grids, use `GetSelectedBlocks()` (not implemented in wx) in the new code.

# getSelectedCols(This)

    -spec getSelectedCols(This) -> [integer()] when This :: wxGrid().

Returns an array of selected columns.

Please notice that this method alone is not sufficient to find all the selected columns as it contains only the columns which were individually selected but not those being part of the block selection or being selected in virtue of all of their cells being selected individually, please see `getSelectedCells/1` for more details.

The function can be slow for the big grids, use `GetSelectedBlocks()` (not implemented in wx) in the new code.

# getSelectedRows(This)

    -spec getSelectedRows(This) -> [integer()] when This :: wxGrid().

Returns an array of selected rows.

Please notice that this method alone is not sufficient to find all the selected rows as it contains only the rows which were individually selected but not those being part of the block selection or being selected in virtue of all of their cells being selected individually, please see `getSelectedCells/1` for more details.

The function can be slow for the big grids, use `GetSelectedBlocks()` (not implemented in wx) in the new code.

# getSelectionBackground(This)

    -spec getSelectionBackground(This) -> wx:wx_colour4() when This :: wxGrid().

Returns the colour used for drawing the selection background.

# getSelectionBlockBottomRight(This)

    -spec getSelectionBlockBottomRight(This) -> [{R :: integer(), C :: integer()}] when This :: wxGrid().

Returns an array of the bottom right corners of blocks of selected cells.

Please see `getSelectedCells/1` for more information about the selection representation in `wxGrid`.

The function can be slow for the big grids, use `GetSelectedBlocks()` (not implemented in wx) in the new code.

See: `getSelectionBlockTopLeft/1`

# getSelectionBlockTopLeft(This)

    -spec getSelectionBlockTopLeft(This) -> [{R :: integer(), C :: integer()}] when This :: wxGrid().

Returns an array of the top left corners of blocks of selected cells.

Please see `getSelectedCells/1` for more information about the selection representation in `wxGrid`.

The function can be slow for the big grids, use `GetSelectedBlocks()` (not implemented in wx) in the new code.

See: `getSelectionBlockBottomRight/1`

# getSelectionForeground(This)

    -spec getSelectionForeground(This) -> wx:wx_colour4() when This :: wxGrid().

Returns the colour used for drawing the selection foreground.

# gridLinesEnabled(This)

    -spec gridLinesEnabled(This) -> boolean() when This :: wxGrid().

Returns true if drawing of grid lines is turned on, false otherwise.

# hideCellEditControl(This)

    -spec hideCellEditControl(This) -> ok when This :: wxGrid().

Hides the in-place cell edit control.

# insertCols(This)

    -spec insertCols(This) -> boolean() when This :: wxGrid().

Equivalent to `insertCols(This, [])`.

# insertCols/2

    -spec insertCols(This, [Option]) -> boolean()
                        when
                            This :: wxGrid(),
                            Option :: {pos, integer()} | {numCols, integer()} | {updateLabels, boolean()}.

Inserts one or more new columns into a grid with the first new column at the specified position.

Notice that inserting the columns in the grid requires grid table cooperation: when this method is called, grid object begins by requesting the underlying grid table to insert new columns. If this is successful the table notifies the grid and the grid updates the display. For a default grid (one where you have called `createGrid/4`) this process is automatic. If you are using a custom grid table (specified with `SetTable()` (not implemented in wx) or `AssignTable()` (not implemented in wx)) then you must override `wxGridTableBase::InsertCols()` (not implemented in wx) in your derived table class.

Return: true if the columns were successfully inserted, false if an error occurred (most likely the table couldn't be updated).

# insertRows(This)

    -spec insertRows(This) -> boolean() when This :: wxGrid().

Equivalent to `insertRows(This, [])`.

# insertRows/2

    -spec insertRows(This, [Option]) -> boolean()
                        when
                            This :: wxGrid(),
                            Option :: {pos, integer()} | {numRows, integer()} | {updateLabels, boolean()}.

Inserts one or more new rows into a grid with the first new row at the specified position.

Notice that you must implement `wxGridTableBase::InsertRows()` (not implemented in wx) if you use a grid with a custom table, please see `insertCols/2` for more information.

Return: true if the rows were successfully inserted, false if an error occurred (most likely the table couldn't be updated).

# isCellEditControlEnabled(This)

    -spec isCellEditControlEnabled(This) -> boolean() when This :: wxGrid().

Returns true if the in-place edit control is currently enabled.

# isCurrentCellReadOnly(This)

    -spec isCurrentCellReadOnly(This) -> boolean() when This :: wxGrid().

Returns true if the current cell is read-only.

See:

- `setReadOnly/4`

- `isReadOnly/3`

# isEditable(This)

    -spec isEditable(This) -> boolean() when This :: wxGrid().

Returns false if the whole grid has been set as read-only or true otherwise.

See `enableEditing/2` for more information about controlling the editing status of grid cells.

# isInSelection(This, Coords)

    -spec isInSelection(This, Coords) -> boolean()
                           when This :: wxGrid(), Coords :: {R :: integer(), C :: integer()}.

Returns true if the given cell is selected.

# isInSelection(This, Row, Col)

    -spec isInSelection(This, Row, Col) -> boolean()
                           when This :: wxGrid(), Row :: integer(), Col :: integer().

Returns true if the given cell is selected.

# isReadOnly(This, Row, Col)

    -spec isReadOnly(This, Row, Col) -> boolean() when This :: wxGrid(), Row :: integer(), Col :: integer().

Returns true if the cell at the specified location can't be edited.

See:

- `setReadOnly/4`

- `isCurrentCellReadOnly/1`

# isSelection(This)

    -spec isSelection(This) -> boolean() when This :: wxGrid().

Returns true if there are currently any selected cells, rows, columns or blocks.

# isVisible(This, Coords)

    -spec isVisible(This, Coords) -> boolean()
                       when This :: wxGrid(), Coords :: {R :: integer(), C :: integer()}.

Equivalent to `isVisible(This, Coords, [])`.

# isVisible/3

    -spec isVisible(This, Row, Col) -> boolean() when This :: wxGrid(), Row :: integer(), Col :: integer();
                   (This, Coords, [Option]) -> boolean()
                       when
                           This :: wxGrid(),
                           Coords :: {R :: integer(), C :: integer()},
                           Option :: {wholeCellVisible, boolean()}.

Returns true if a cell is either entirely or at least partially visible in the grid window.

By default, the cell must be entirely visible for this function to return true but if `wholeCellVisible` is false, the function returns true even if the cell is only partially visible.

# isVisible/4

    -spec isVisible(This, Row, Col, [Option]) -> boolean()
                       when
                           This :: wxGrid(),
                           Row :: integer(),
                           Col :: integer(),
                           Option :: {wholeCellVisible, boolean()}.

Returns true if a cell is either entirely or at least partially visible in the grid window.

By default, the cell must be entirely visible for this function to return true but if `wholeCellVisible` is false, the function returns true even if the cell is only partially visible.

# makeCellVisible(This, Coords)

    -spec makeCellVisible(This, Coords) -> ok
                             when This :: wxGrid(), Coords :: {R :: integer(), C :: integer()}.

Brings the specified cell into the visible grid cell area with minimal scrolling.

Does nothing if the cell is already visible.

# makeCellVisible(This, Row, Col)

    -spec makeCellVisible(This, Row, Col) -> ok when This :: wxGrid(), Row :: integer(), Col :: integer().

Brings the specified cell into the visible grid cell area with minimal scrolling.

Does nothing if the cell is already visible.

# moveCursorDown(This, ExpandSelection)

    -spec moveCursorDown(This, ExpandSelection) -> boolean()
                            when This :: wxGrid(), ExpandSelection :: boolean().

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 the argument is false.

# moveCursorDownBlock(This, ExpandSelection)

    -spec moveCursorDownBlock(This, ExpandSelection) -> boolean()
                                 when This :: wxGrid(), ExpandSelection :: boolean().

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 the argument is true or be cleared if the argument is false.

# moveCursorLeft(This, ExpandSelection)

    -spec moveCursorLeft(This, ExpandSelection) -> boolean()
                            when This :: wxGrid(), ExpandSelection :: boolean().

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 the argument is false.

# moveCursorLeftBlock(This, ExpandSelection)

    -spec moveCursorLeftBlock(This, ExpandSelection) -> boolean()
                                 when This :: wxGrid(), ExpandSelection :: boolean().

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 the argument is true or be cleared if the argument is false.

# moveCursorRight(This, ExpandSelection)

    -spec moveCursorRight(This, ExpandSelection) -> boolean()
                             when This :: wxGrid(), ExpandSelection :: boolean().

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 the argument is false.

# moveCursorRightBlock(This, ExpandSelection)

    -spec moveCursorRightBlock(This, ExpandSelection) -> boolean()
                                  when This :: wxGrid(), ExpandSelection :: boolean().

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 the argument is true or be cleared if the argument is false.

# moveCursorUp(This, ExpandSelection)

    -spec moveCursorUp(This, ExpandSelection) -> boolean()
                          when This :: wxGrid(), ExpandSelection :: boolean().

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 the argument is false.

# moveCursorUpBlock(This, ExpandSelection)

    -spec moveCursorUpBlock(This, ExpandSelection) -> boolean()
                               when This :: wxGrid(), ExpandSelection :: boolean().

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 the argument is true or be cleared if the argument is false.

# movePageDown(This)

    -spec movePageDown(This) -> boolean() when This :: wxGrid().

Moves the grid cursor down by some number of rows so that the previous bottom visible row becomes the top visible row.

# movePageUp(This)

    -spec movePageUp(This) -> boolean() when This :: wxGrid().

Moves the grid cursor up by some number of rows so that the previous top visible row becomes the bottom visible row.

# new()

    -spec new() -> wxGrid().

Default constructor.

You must call `Create()` (not implemented in wx) to really create the grid window and also call `createGrid/4` or `SetTable()` (not implemented in wx) or `AssignTable()` (not implemented in wx) to initialize its contents.

# new(Parent, Id)

    -spec new(Parent, Id) -> wxGrid() when Parent :: wxWindow:wxWindow(), Id :: integer().

Equivalent to `new(Parent, Id, [])`.

# new/3

    -spec new(Parent, Id, [Option]) -> wxGrid()
                 when
                     Parent :: wxWindow:wxWindow(),
                     Id :: integer(),
                     Option ::
                         {pos, {X :: integer(), Y :: integer()}} |
                         {size, {W :: integer(), H :: integer()}} |
                         {style, integer()}.

Constructor creating the grid window.

You must call either `createGrid/4` or `SetTable()` (not implemented in wx) or `AssignTable()` (not implemented in wx) to initialize the grid contents before using it.

# registerDataType(This, TypeName, Renderer, Editor)

    -spec registerDataType(This, TypeName, Renderer, Editor) -> ok
                              when
                                  This :: wxGrid(),
                                  TypeName :: unicode:chardata(),
                                  Renderer :: wxGridCellRenderer:wxGridCellRenderer(),
                                  Editor :: wxGridCellEditor:wxGridCellEditor().

Register a new data type.

The data types allow to naturally associate specific renderers and editors to the cells containing values of the given type. For example, the grid automatically registers a data type with the name `wxGRID_VALUE_STRING` which uses `wxGridCellStringRenderer` and `wxGridCellTextEditor` as its renderer and editor respectively - this is the data type used by all the cells of the default `wxGridStringTable` (not implemented in wx), so this renderer and editor are used by default for all grid cells.

However if a custom table returns `wxGRID_VALUE_BOOL` from its `wxGridTableBase::GetTypeName()` (not implemented in wx) method, then `wxGridCellBoolRenderer` and `wxGridCellBoolEditor` are used for it because the grid also registers a boolean data type with this name.

And as this mechanism is completely generic, you may register your own data types using your own custom renderers and editors. Just remember that the table must identify a cell as being of the given type for them to be used for this cell.

# saveEditControlValue(This)

    -spec saveEditControlValue(This) -> ok when This :: wxGrid().

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.

# selectAll(This)

    -spec selectAll(This) -> ok when This :: wxGrid().

Selects all cells in the grid.

# selectBlock(This, TopLeft, BottomRight)

    -spec selectBlock(This, TopLeft, BottomRight) -> ok
                         when
                             This :: wxGrid(),
                             TopLeft :: {R :: integer(), C :: integer()},
                             BottomRight :: {R :: integer(), C :: integer()}.

Equivalent to `selectBlock(This, TopLeft, BottomRight, [])`.

# selectBlock/4

    -spec selectBlock(This, TopLeft, BottomRight, [Option]) -> ok
                         when
                             This :: wxGrid(),
                             TopLeft :: {R :: integer(), C :: integer()},
                             BottomRight :: {R :: integer(), C :: integer()},
                             Option :: {addToSelected, boolean()}.

Selects a rectangular block of cells.

If `addToSelected` is false then any existing selection will be deselected; if true the column will be added to the existing selection.

# selectBlock(This, TopRow, LeftCol, BottomRow, RightCol)

    -spec selectBlock(This, TopRow, LeftCol, BottomRow, RightCol) -> ok
                         when
                             This :: wxGrid(),
                             TopRow :: integer(),
                             LeftCol :: integer(),
                             BottomRow :: integer(),
                             RightCol :: integer().

Equivalent to `selectBlock(This, TopRow, LeftCol, BottomRow, RightCol, [])`.

# selectBlock/6

    -spec selectBlock(This, TopRow, LeftCol, BottomRow, RightCol, [Option]) -> ok
                         when
                             This :: wxGrid(),
                             TopRow :: integer(),
                             LeftCol :: integer(),
                             BottomRow :: integer(),
                             RightCol :: integer(),
                             Option :: {addToSelected, boolean()}.

Selects a rectangular block of cells.

If `addToSelected` is false then any existing selection will be deselected; if true the column will be added to the existing selection.

# selectCol(This, Col)

    -spec selectCol(This, Col) -> ok when This :: wxGrid(), Col :: integer().

Equivalent to `selectCol(This, Col, [])`.

# selectCol/3

    -spec selectCol(This, Col, [Option]) -> ok
                       when This :: wxGrid(), Col :: integer(), Option :: {addToSelected, boolean()}.

Selects the specified column.

If `addToSelected` is false then any existing selection will be deselected; if true the column will be added to the existing selection.

This method won't select anything if the current selection mode is wxGridSelectRows.

# selectRow(This, Row)

    -spec selectRow(This, Row) -> ok when This :: wxGrid(), Row :: integer().

Equivalent to `selectRow(This, Row, [])`.

# selectRow/3

    -spec selectRow(This, Row, [Option]) -> ok
                       when This :: wxGrid(), Row :: integer(), Option :: {addToSelected, boolean()}.

Selects the specified row.

If `addToSelected` is false then any existing selection will be deselected; if true the row will be added to the existing selection.

This method won't select anything if the current selection mode is wxGridSelectColumns.

# setCellAlignment(This, Row, Col, Horiz, Vert)

    -spec setCellAlignment(This, Row, Col, Horiz, Vert) -> ok
                              when
                                  This :: wxGrid(),
                                  Row :: integer(),
                                  Col :: integer(),
                                  Horiz :: integer(),
                                  Vert :: integer().

Sets the horizontal and vertical alignment for grid cell text at the specified location.

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`.

# setCellBackgroundColour(This, Row, Col, Colour)

    -spec setCellBackgroundColour(This, Row, Col, Colour) -> ok
                                     when
                                         This :: wxGrid(),
                                         Row :: integer(),
                                         Col :: integer(),
                                         Colour :: wx:wx_colour().

Set the background colour for the given cell or all cells by default.

# setCellEditor(This, Row, Col, Editor)

    -spec setCellEditor(This, Row, Col, Editor) -> ok
                           when
                               This :: wxGrid(),
                               Row :: integer(),
                               Col :: integer(),
                               Editor :: wxGridCellEditor:wxGridCellEditor().

Sets the editor for the grid cell at the specified location.

The grid will take ownership of the pointer.

See `wxGridCellEditor` and the overview_grid for more information about cell editors and renderers.

# setCellFont(This, Row, Col, Font)

    -spec setCellFont(This, Row, Col, Font) -> ok
                         when This :: wxGrid(), Row :: integer(), Col :: integer(), Font :: wxFont:wxFont().

Sets the font for text in the grid cell at the specified location.

# setCellRenderer(This, Row, Col, Renderer)

    -spec setCellRenderer(This, Row, Col, Renderer) -> ok
                             when
                                 This :: wxGrid(),
                                 Row :: integer(),
                                 Col :: integer(),
                                 Renderer :: wxGridCellRenderer:wxGridCellRenderer().

Sets the renderer for the grid cell at the specified location.

The grid will take ownership of the pointer.

See `wxGridCellRenderer` and the overview_grid for more information about cell editors and renderers.

# setCellTextColour(This, Row, Col, Colour)

    -spec setCellTextColour(This, Row, Col, Colour) -> ok
                               when
                                   This :: wxGrid(),
                                   Row :: integer(),
                                   Col :: integer(),
                                   Colour :: wx:wx_colour().

Sets the text colour for the given cell.

# setCellValue(This, Coords, S)

    -spec setCellValue(This, Coords, S) -> ok
                          when
                              This :: wxGrid(),
                              Coords :: {R :: integer(), C :: integer()},
                              S :: unicode:chardata().

Sets the string value for the cell at the specified location.

For simple applications where a grid object automatically uses a default grid table of string values you use this function together with `getCellValue/3` to access cell values. For more complex applications where you have derived your own grid table class that contains various data types (e.g. numeric, boolean or user-defined custom types) then you only use this function for those cells that contain string values.

See `wxGridTableBase::CanSetValueAs()` (not implemented in wx) and the overview_grid for more information.

# setCellValue(This, Row, Col, S)

    -spec setCellValue(This, Row, Col, S) -> ok
                          when This :: wxGrid(), Row :: integer(), Col :: integer(), S :: unicode:chardata().

Sets the string value for the cell at the specified location.

For simple applications where a grid object automatically uses a default grid table of string values you use this function together with `getCellValue/3` to access cell values. For more complex applications where you have derived your own grid table class that contains various data types (e.g. numeric, boolean or user-defined custom types) then you only use this function for those cells that contain string values.

See `wxGridTableBase::CanSetValueAs()` (not implemented in wx) and the overview_grid for more information.

# setColAttr(This, Col, Attr)

    -spec setColAttr(This, Col, Attr) -> ok
                        when This :: wxGrid(), Col :: integer(), Attr :: wxGridCellAttr:wxGridCellAttr().

Sets the cell attributes for all cells in the specified column.

For more information about controlling grid cell attributes see the `wxGridCellAttr` cell attribute class and the overview_grid.

# setColFormatBool(This, Col)

    -spec setColFormatBool(This, Col) -> ok when This :: wxGrid(), Col :: integer().

Sets the specified column to display boolean values.

See: `setColFormatCustom/3`

# setColFormatCustom(This, Col, TypeName)

    -spec setColFormatCustom(This, Col, TypeName) -> ok
                                when This :: wxGrid(), Col :: integer(), TypeName :: unicode:chardata().

Sets the specified column to display data in a custom format.

This method provides an alternative to defining a custom grid table which would return `typeName` from its GetTypeName() method for the cells in this column: while it doesn't really change the type of the cells in this column, it does associate the renderer and editor used for the cells of the specified type with them.

See the overview_grid for more information on working with custom data types.

# setColFormatFloat(This, Col)

    -spec setColFormatFloat(This, Col) -> ok when This :: wxGrid(), Col :: integer().

Equivalent to `setColFormatFloat(This, Col, [])`.

# setColFormatFloat/3

    -spec setColFormatFloat(This, Col, [Option]) -> ok
                               when
                                   This :: wxGrid(),
                                   Col :: integer(),
                                   Option :: {width, integer()} | {precision, integer()}.

Sets the specified column to display floating point values with the given width and precision.

See: `setColFormatCustom/3`

# setColFormatNumber(This, Col)

    -spec setColFormatNumber(This, Col) -> ok when This :: wxGrid(), Col :: integer().

Sets the specified column to display integer values.

See: `setColFormatCustom/3`

# setColLabelAlignment(This, Horiz, Vert)

    -spec setColLabelAlignment(This, Horiz, Vert) -> ok
                                  when This :: wxGrid(), Horiz :: integer(), Vert :: integer().

Sets the horizontal and vertical alignment of column label 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`.

# setColLabelSize(This, Height)

    -spec setColLabelSize(This, Height) -> ok when This :: wxGrid(), Height :: integer().

Sets the height of the column labels.

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.

# setColLabelValue(This, Col, Value)

    -spec setColLabelValue(This, Col, Value) -> ok
                              when This :: wxGrid(), Col :: integer(), Value :: unicode:chardata().

Set the value for the given column label.

If you are using a custom grid table you must override `wxGridTableBase::SetColLabelValue()` (not implemented in wx) for this to have any effect.

# setColMinimalAcceptableWidth(This, Width)

    -spec setColMinimalAcceptableWidth(This, Width) -> ok when This :: wxGrid(), Width :: integer().

Sets the minimal `width` to which the user can resize columns.

See: `getColMinimalAcceptableWidth/1`

# setColMinimalWidth(This, Col, Width)

    -spec setColMinimalWidth(This, Col, Width) -> ok
                                when This :: wxGrid(), Col :: integer(), Width :: integer().

Sets the minimal `width` for the specified column `col`.

It is usually best to call this method during grid creation as calling it later will not resize the column to the given minimal width even if it is currently narrower than it.

`width` must be greater than the minimal acceptable column width as returned by `getColMinimalAcceptableWidth/1`.

# setColSize(This, Col, Width)

    -spec setColSize(This, Col, Width) -> ok when This :: wxGrid(), Col :: integer(), Width :: integer().

Sets the width of the specified column.

# setDefaultCellAlignment(This, Horiz, Vert)

    -spec setDefaultCellAlignment(This, Horiz, Vert) -> ok
                                     when This :: wxGrid(), Horiz :: integer(), Vert :: integer().

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`.

# setDefaultCellBackgroundColour(This, Colour)

    -spec setDefaultCellBackgroundColour(This, Colour) -> ok when This :: wxGrid(), Colour :: wx:wx_colour().

Sets the default background colour for grid cells.

# setDefaultCellFont(This, Font)

    -spec setDefaultCellFont(This, Font) -> ok when This :: wxGrid(), Font :: wxFont:wxFont().

Sets the default font to be used for grid cell text.

# setDefaultCellTextColour(This, Colour)

    -spec setDefaultCellTextColour(This, Colour) -> ok when This :: wxGrid(), Colour :: wx:wx_colour().

Sets the current default colour for grid cell text.

# setDefaultColSize(This, Width)

    -spec setDefaultColSize(This, Width) -> ok when This :: wxGrid(), Width :: integer().

Equivalent to `setDefaultColSize(This, Width, [])`.

# setDefaultColSize/3

    -spec setDefaultColSize(This, Width, [Option]) -> ok
                               when
                                   This :: wxGrid(),
                                   Width :: integer(),
                                   Option :: {resizeExistingCols, boolean()}.

Sets the default width for columns in the grid.

This will only affect columns subsequently added to the grid unless `resizeExistingCols` is true.

If `width` is less than `getColMinimalAcceptableWidth/1`, then the minimal acceptable width is used instead of it.

# setDefaultEditor(This, Editor)

    -spec setDefaultEditor(This, Editor) -> ok
                              when This :: wxGrid(), Editor :: wxGridCellEditor:wxGridCellEditor().

Sets the default editor for grid cells.

The grid will take ownership of the pointer.

See `wxGridCellEditor` and the overview_grid for more information about cell editors and renderers.

# setDefaultRenderer(This, Renderer)

    -spec setDefaultRenderer(This, Renderer) -> ok
                                when This :: wxGrid(), Renderer :: wxGridCellRenderer:wxGridCellRenderer().

Sets the default renderer for grid cells.

The grid will take ownership of the pointer.

See `wxGridCellRenderer` and the overview_grid for more information about cell editors and renderers.

# setDefaultRowSize(This, Height)

    -spec setDefaultRowSize(This, Height) -> ok when This :: wxGrid(), Height :: integer().

Equivalent to `setDefaultRowSize(This, Height, [])`.

# setDefaultRowSize/3

    -spec setDefaultRowSize(This, Height, [Option]) -> ok
                               when
                                   This :: wxGrid(),
                                   Height :: integer(),
                                   Option :: {resizeExistingRows, boolean()}.

Sets the default height for rows in the grid.

This will only affect rows subsequently added to the grid unless `resizeExistingRows` is true.

If `height` is less than `getRowMinimalAcceptableHeight/1`, then the minimal acceptable height is used instead of it.

# setGridCursor(This, Coords)

    -spec setGridCursor(This, Coords) -> ok
                           when This :: wxGrid(), Coords :: {R :: integer(), C :: integer()}.

Set the grid cursor to the specified cell.

The grid cursor indicates the current cell and can be moved by the user using the arrow keys or the mouse.

Calling this function generates a `wxEVT_GRID_SELECT_CELL` event and if the event handler vetoes this event, the cursor is not moved.

This function doesn't make the target call visible, use `GoToCell()` (not implemented in wx) to do this.

# setGridCursor(This, Row, Col)

    -spec setGridCursor(This, Row, Col) -> ok when This :: wxGrid(), Row :: integer(), Col :: integer().

Set the grid cursor to the specified cell.

The grid cursor indicates the current cell and can be moved by the user using the arrow keys or the mouse.

Calling this function generates a `wxEVT_GRID_SELECT_CELL` event and if the event handler vetoes this event, the cursor is not moved.

This function doesn't make the target call visible, use `GoToCell()` (not implemented in wx) to do this.

# setGridLineColour(This, Colour)

    -spec setGridLineColour(This, Colour) -> ok when This :: wxGrid(), Colour :: wx:wx_colour().

Sets the colour used to draw grid lines.

# setLabelBackgroundColour(This, Colour)

    -spec setLabelBackgroundColour(This, Colour) -> ok when This :: wxGrid(), Colour :: wx:wx_colour().

Sets the background colour for row and column labels.

# setLabelFont(This, Font)

    -spec setLabelFont(This, Font) -> ok when This :: wxGrid(), Font :: wxFont:wxFont().

Sets the font for row and column labels.

# setLabelTextColour(This, Colour)

    -spec setLabelTextColour(This, Colour) -> ok when This :: wxGrid(), Colour :: wx:wx_colour().

Sets the colour for row and column label text.

# setMargins(This, ExtraWidth, ExtraHeight)

    -spec setMargins(This, ExtraWidth, ExtraHeight) -> ok
                        when This :: wxGrid(), ExtraWidth :: integer(), ExtraHeight :: integer().

Sets the extra margins used around the grid area.

A grid may occupy more space than needed for its data display and this function allows setting how big this extra space is

# setReadOnly(This, Row, Col)

    -spec setReadOnly(This, Row, Col) -> ok when This :: wxGrid(), Row :: integer(), Col :: integer().

Equivalent to `setReadOnly(This, Row, Col, [])`.

# setReadOnly/4

    -spec setReadOnly(This, Row, Col, [Option]) -> ok
                         when
                             This :: wxGrid(),
                             Row :: integer(),
                             Col :: integer(),
                             Option :: {isReadOnly, boolean()}.

Makes the cell at the specified location read-only or editable.

See: `isReadOnly/3`

# setRowAttr(This, Row, Attr)

    -spec setRowAttr(This, Row, Attr) -> ok
                        when This :: wxGrid(), Row :: integer(), Attr :: wxGridCellAttr:wxGridCellAttr().

Sets the cell attributes for all cells in the specified row.

The grid takes ownership of the attribute pointer.

See the `wxGridCellAttr` class for more information about controlling cell attributes.

# setRowLabelAlignment(This, Horiz, Vert)

    -spec setRowLabelAlignment(This, Horiz, Vert) -> ok
                                  when This :: wxGrid(), Horiz :: integer(), Vert :: integer().

Sets the horizontal and vertical alignment of row label 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`.

# setRowLabelSize(This, Width)

    -spec setRowLabelSize(This, Width) -> ok when This :: wxGrid(), Width :: integer().

Sets the width of the row labels.

If `width` equals `wxGRID_AUTOSIZE` then width is calculated automatically so that no label is truncated. Note that this could be slow for a large table.

# setRowLabelValue(This, Row, Value)

    -spec setRowLabelValue(This, Row, Value) -> ok
                              when This :: wxGrid(), Row :: integer(), Value :: unicode:chardata().

Sets the value for the given row label.

If you are using a derived grid table you must override `wxGridTableBase::SetRowLabelValue()` (not implemented in wx) for this to have any effect.

# setRowMinimalAcceptableHeight(This, Height)

    -spec setRowMinimalAcceptableHeight(This, Height) -> ok when This :: wxGrid(), Height :: integer().

Sets the minimal row `height` used by default.

See `setColMinimalAcceptableWidth/2` for more information.

# setRowMinimalHeight(This, Row, Height)

    -spec setRowMinimalHeight(This, Row, Height) -> ok
                                 when This :: wxGrid(), Row :: integer(), Height :: integer().

Sets the minimal `height` for the specified `row`.

See `setColMinimalWidth/3` for more information.

# setRowSize(This, Row, Height)

    -spec setRowSize(This, Row, Height) -> ok when This :: wxGrid(), Row :: integer(), Height :: integer().

Sets the height of the specified row.

See `setColSize/3` for more information.

# setScrollLineX(This, X)

    -spec setScrollLineX(This, X) -> ok when This :: wxGrid(), X :: integer().

Sets the number of pixels per horizontal scroll increment.

The default is 15.

See:

- `getScrollLineX/1`

- `getScrollLineY/1`

- `setScrollLineY/2`

# setScrollLineY(This, Y)

    -spec setScrollLineY(This, Y) -> ok when This :: wxGrid(), Y :: integer().

Sets the number of pixels per vertical scroll increment.

The default is 15.

See:

- `getScrollLineX/1`

- `getScrollLineY/1`

- `setScrollLineX/2`

# setSelectionBackground(This, C)

    -spec setSelectionBackground(This, C) -> ok when This :: wxGrid(), C :: wx:wx_colour().

Set the colour to be used for drawing the selection background.

# setSelectionForeground(This, C)

    -spec setSelectionForeground(This, C) -> ok when This :: wxGrid(), C :: wx:wx_colour().

Set the colour to be used for drawing the selection foreground.

# setSelectionMode(This, Selmode)

    -spec setSelectionMode(This, Selmode) -> ok when This :: wxGrid(), Selmode :: wx:wx_enum().

Set the selection behaviour of the grid.

The existing selection is converted to conform to the new mode if possible and discarded otherwise (e.g. any individual selected cells are deselected if the new mode allows only the selection of the entire rows or columns).

# showCellEditControl(This)

    -spec showCellEditControl(This) -> ok when This :: wxGrid().

Displays the active in-place cell edit control for the current cell after it was hidden.

This method should only be called after calling `hideCellEditControl/1`, to start editing the current grid cell use `enableCellEditControl/2` instead.

# xToCol(This, X)

    -spec xToCol(This, X) -> integer() when This :: wxGrid(), X :: integer().

Equivalent to `xToCol(This, X, [])`.

# xToCol/3

    -spec xToCol(This, X, [Option]) -> integer()
                    when This :: wxGrid(), X :: integer(), Option :: {clipToMinMax, boolean()}.

Returns the column at the given pixel position depending on the window.

Return: The column index or `wxNOT_FOUND`.

# xToEdgeOfCol(This, X)

    -spec xToEdgeOfCol(This, X) -> integer() when This :: wxGrid(), X :: integer().

Returns the column whose right hand edge is close to the given logical `x` position.

If no column edge is near to this position `wxNOT_FOUND` is returned.

# yToEdgeOfRow(This, Y)

    -spec yToEdgeOfRow(This, Y) -> integer() when This :: wxGrid(), Y :: integer().

Returns the row whose bottom edge is close to the given logical `y` position.

If no row edge is near to this position `wxNOT_FOUND` is returned.

# yToRow(This, Y)

    -spec yToRow(This, Y) -> integer() when This :: wxGrid(), Y :: integer().

Equivalent to `yToRow(This, Y, [])`.

# yToRow/3

    -spec yToRow(This, Y, [Option]) -> integer()
                    when This :: wxGrid(), Y :: integer(), Option :: {clipToMinMax, boolean()}.

Returns the grid row that corresponds to the logical `y` coordinate.

The parameter `gridWindow` is new since wxWidgets 3.1.3. If it is specified, i.e. non-NULL, only the cells of this window are considered, i.e. the function returns `wxNOT_FOUND` if `y` is out of bounds.

If `gridWindow` is NULL, the function returns `wxNOT_FOUND` only if there is no row at all at the `y` position.