keyboard shortcuts and mouse functions provided by wxGrid.
wxGrid has been greatly expanded and redesigned for wxWidgets 2.2
-onwards. If you have been using the old wxGrid class you will probably
-want to have a look at the \helpref{wxGrid classes overview}{gridoverview} to see
-how things have changed. The new grid classes are reasonably backward-compatible
+onwards. The new grid classes are reasonably backward-compatible
but there are some exceptions. There are also easier ways of doing many things compared to
the previous implementation.
+A \helpref{wxGridTableBase}{wxgridtablebase} 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 and
+holds an array of strings. An instance of such a class is created
+by \helpref{wxGrid::CreateGrid}{wxgridcreategrid}.
+
+\helpref{wxGridCellRenderer}{wxgridcellrenderer} is the abstract base
+class for rendereing contents in a cell. The following renderers are
+predefined:
+\helpref{wxGridCellStringRenderer}{wxgridcellstringrenderer},
+\helpref{wxGridCellBoolRenderer}{wxgridcellboolrenderer},
+\helpref{wxGridCellFloatRenderer}{wxgridcellfloatrenderer},
+\helpref{wxGridCellNumberRenderer}{wxgridcellnumberrenderer}. The
+look of a cell can be further defined using \helpref{wxGridCellAttr}{wxgridcellattr}.
+An object of this type may be returned by \helpref{wxGridTableBase::GetAttr}{wxgridtablebasegetattr}.
+
+\helpref{wxGridCellEditor}{wxgridcelleditor} is the abstract base
+class for editing the value of a cell. The following editors are
+predefined:
+\helpref{wxGridCellTextEditor}{wxgridcelltexteditor}
+\helpref{wxGridCellBoolEditor}{wxgridcellbooleditor}
+\helpref{wxGridCellChoiceEditor}{wxgridcellchoiceeditor}
+\helpref{wxGridCellNumberEditor}{wxgridcellnumbereditor}.
+
+
\wxheading{Derived from}
\helpref{wxScrolledWindow}{wxscrolledwindow}\\
+\helpref{wxPanel}{wxpanel}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
<wx/grid.h>
+\wxheading{Library}
+
+\helpref{wxAdv}{librarieslist}
+
\wxheading{Window styles}
There are presently no specific window styles for wxGrid.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_GRID\_COL\_SIZE(func)}}{The user resized a column by dragging it. Processes a wxEVT\_GRID\_COL\_SIZE.}
+\twocolitem{{\bf EVT\_GRID\_COL\_MOVE(func)}}{The user moved a column by dragging it. Processes a wxEVT\_GRID\_COL\_MOVE.}
\twocolitem{{\bf EVT\_GRID\_ROW\_SIZE(func)}}{The user resized a row by dragging it. Processes a wxEVT\_GRID\_ROW\_SIZE.}
\twocolitem{{\bf EVT\_GRID\_CMD\_COL\_SIZE(func)}}{The user resized a column by dragging it; variant taking a window identifier. Processes a wxEVT\_GRID\_COL\_SIZE.}
+\twocolitem{{\bf EVT\_GRID\_CMD\_COL\_MOVE(func)}}{The user moved a column by dragging it; variant taking a window identifier. Processes a wxEVT\_GRID\_COL\_MOVE.}
\twocolitem{{\bf EVT\_GRID\_CMD\_ROW\_SIZE(func)}}{The user resized a row by dragging it; variant taking a window identifier. Processes a wxEVT\_GRID\_ROW\_SIZE.}
\end{twocollist}%
\helpref{SetTable}{wxgridsettable}
-
-\membersection{Display format}\label{wxgriddisplayformat}
-
-
+\membersection{Cursor movement}\label{wxgridcursormovement}
+
+\helpref{wxGrid::MoveCursorUp}{wxgridmovecursorup}\\
+\helpref{wxGrid::MoveCursorDown}{wxgridmovecursordown}\\
+\helpref{wxGrid::MoveCursorLeft}{wxgridmovecursorleft}\\
+\helpref{wxGrid::MoveCursorRight}{wxgridmovecursorright}\\
+\helpref{wxGrid::MoveCursorPageUp}{wxgridmovecursorup}\\
+\helpref{wxGrid::MoveCursorPageDown}{wxgridmovecursordown}\\
+\helpref{wxGrid::MoveCursorUpBlock}{wxgridmovecursorupblock}\\
+\helpref{wxGrid::MoveCursorDownBlock}{wxgridmovecursordownblock}\\
+\helpref{wxGrid::MoveCursorLeftBlock}{wxgridmovecursorleftblock}\\
+\helpref{wxGrid::MoveCursorRightBlock}{wxgridmovecursorrightblock}
+
+
+\membersection{Grid line formatting}\label{wxgridlineformatting}
+
+\helpref{wxGrid::EnableGridLines}{wxgridenablegridlines}\\
+\helpref{wxGrid::GridLinesEnabled}{wxgridgridlinesenabled}\\
+\helpref{wxGrid::SetGridLineColour}{wxgridsetgridlinecolour}\\
+\helpref{wxGrid::GetGridLineColour}{wxgridgetgridlinecolour}\\
+\helpref{wxGrid::GetDefaultGridLinePen}{wxgridgetdefaultgridlinepen}\\
+\helpref{wxGrid::GetRowGridLinePen}{wxgridgetrowgridlinepen}\\
+\helpref{wxGrid::GetColGridLinePen}{wxgridgetcolgridlinepen}
+
+\membersection{Row and column label value and format}\label{wxgridrowcoulmlabelformat}
+
+\helpref{wxGrid::SetRowLabelValue}{wxgridsetrowlabelvalue}\\
+\helpref{wxGrid::SetColLabelValue}{wxgridsetcollabelvalue}\\
+\helpref{wxGrid::GetRowLabelValue}{wxgridgetrowlabelvalue}\\
+\helpref{wxGrid::GetColLabelValue}{wxgridgetcollabelvalue}\\
+\helpref{wxGrid::SetUseNativeColLabels}{wxgridsetsenativecollabels}\\
+\helpref{wxGrid::HideColLabels}{wxgridhidecollabels}\\
+\helpref{wxGrid::HideRowLabels}{wxgridhiderowlabels}\\
+\helpref{wxGrid::SetRowLabelSize}{wxgridsetrowlabelsize}\\
+\helpref{wxGrid::SetColLabelSize}{wxgridsetcollabelsize}\\
+\helpref{wxGrid::GetRowLabelSize}{wxgridgetrowlabelsize}\\
+\helpref{wxGrid::GetColLabelSize}{wxgridgetcollabelsize}\\
+\helpref{wxGrid::AutoSizeRowLabelSize}{wxgridautosizerowlabelsize}\\
+\helpref{wxGrid::AutoSizeColLabelSize}{wxgridautosizecollabelsize}\\
+\helpref{wxGrid::GetDefaultRowLabelSize}{wxgridgetdefaultrowlabelsize}\\
+\helpref{wxGrid::GetDefaultColLabelSize}{wxgridgetdefaultcollabelsize}\\
+\helpref{wxGrid::SetRowLabelAlignment}{wxgridsetrowlabelalignment}\\
+\helpref{wxGrid::SetColLabelAlignment}{wxgridsetcollabelalignment}\\
+\helpref{wxGrid::GetRowLabelAlignment}{wxgridgetrowlabelalignment}\\
+\helpref{wxGrid::GetColLabelAlignment}{wxgridgetcollabelalignment}\\
+\helpref{wxGrid::SetLabelFont}{wxgridsetlabelfont}\\
+\helpref{wxGrid::SetLabelTextColour}{wxgridsetlabeltextcolour}\\
+\helpref{wxGrid::SetLabelBackgroundColour}{wxgridsetlabelbackgroundcolour}\\
+\helpref{wxGrid::GetLabelFont}{wxgridgetlabelfont}\\
+\helpref{wxGrid::GetLabelBackgroundColour}{wxgridgetlabelbackgroundcolour}\\
+\helpref{wxGrid::GetLabelTextColour}{wxgridgetlabeltextcolour}\\
+%\helpref{wxGrid::SetColLabelTextOrientation}{wxgridsetcollabeltextorientation}\\
+%\helpref{wxGrid::GetColLabelTextOrientation}{wxgridgetcollabeltextorientation}
+wxGrid::SetColLabelTextOrientation\\
+wxGrid::GetColLabelTextOrientation
+
+\membersection{Cell, row and column user-resizing and dragging}\label{wxgridcellrowcolresizing}
+
+\helpref{wxGrid::EnableDragRowSize}{wxgridenabledragrowsize}\\
+\helpref{wxGrid::EnableDragColSize}{wxgridenabledragcolsize}\\
+\helpref{wxGrid::CanDragRowSize}{wxgridcandragrowsize}\\
+\helpref{wxGrid::CanDragColSize}{wxgridcandragcolsize}\\
+\helpref{wxGrid::EnableDragColMove}{wxgridenabledragcolmove}\\
+\helpref{wxGrid::CanDragColMove}{wxgridcandragcolmove}\\
+\helpref{wxGrid::EnableDragGridSize}{wxgridenabledraggridsize}\\
+\helpref{wxGrid::CanDragGridSize}{wxgridcandraggridsize}\\
+\helpref{wxGrid::GetColAt}{wxgridgetcolat}\\
+\helpref{wxGrid::SetColPos}{wxgridsetcolpos}\\
+\helpref{wxGrid::GetColPos}{wxgridgetcolpos}\\
+%\helpref{wxGrid::EnableDragCell}{wxgridenabledragcell}\\
+%\helpref{wxGrid::CanDragCell}{wxgridcandragcell}
+wxGrid::EnableDragCell\\
+wxGrid::CanDragCell
+
+\membersection{Autoresizing and cell size constraints}\label{wxgridautoresizingandcellconstriants}
+
+\helpref{wxGrid::AutoSizeColumn}{wxgridautosizecolumn}\\
+\helpref{wxGrid::AutoSizeRow}{wxgridautosizerow}\\
+\helpref{wxGrid::AutoSizeColumns}{wxgridautosizecolumns}\\
+\helpref{wxGrid::AutoSizeRows}{wxgridautosizerows}\\
+\helpref{wxGrid::AutoSize}{wxgridautosize}\\
+\helpref{wxGrid::SetColMinimalWidth}{wxgridsetcolminimalwidth}\\
+\helpref{wxGrid::SetRowMinimalHeight}{wxgridsetrowminimalheight}\\
+\helpref{wxGrid::SetColMinimalAcceptableWidth}{wxgridsetcolminimalacceptablewidth}\\
+\helpref{wxGrid::SetRowMinimalAcceptableHeight}{wxgridsetrowminimalacceptableheight}\\
+\helpref{wxGrid::GetColMinimalAcceptableWidth}{wxgridgetcolminimalacceptablewidth}\\
+\helpref{wxGrid::GetRowMinimalAcceptableHeight}{wxgridgetrowminimalacceptableheight}
\membersection{Selection functions}\label{wxgridselectionfunctions}
-\membersection{wxGrid::AutoSizeColOrRow}\label{wxgridautosizecolorrow}
+\membersection{wxGrid::AutoSizeColLabelSize}\label{wxgridautosizecollabelsize}
-\func{void}{AutoSizeColOrRow}{\param{int }{n}, \param{bool }{setAsMin}, \param{bool }{column}}
+\func{void}{AutoSizeColLabelSize}{\param{int }{col}}
-Common part of AutoSizeColumn/Row() or row?
+Automatically adjusts width of the column to fit its label.
+\membersection{wxGrid::AutoSizeRowLabelSize}\label{wxgridautosizerowlabelsize}
+
+\func{void}{AutoSizeRowLabelSize}{\param{int }{col}}
+
+Automatically adjusts height of the row to fit its label.
+
+
+
\membersection{wxGrid::AutoSizeRows}\label{wxgridautosizerows}
\func{void}{AutoSizeRows}{\param{bool }{setAsMin = true}}
modification can be enclosed between BeginBatch and EndBatch calls to avoid
screen flicker. The final EndBatch will cause the grid to be repainted.
+\wxheading{See also}
+
+\helpref{wxGridUpdateLocker}{wxgridupdatelocker}
+
\membersection{wxGrid::BlockToDeviceRect}\label{wxgridblocktodevicerect}
-\func{wxRect}{BlockToDeviceRect}{\param{const wxGridCellCoords \& }{topLeft}, \param{const wxGridCellCoords \& }{bottomRight}}
+\constfunc{wxRect}{BlockToDeviceRect}{\param{const wxGridCellCoords \& }{topLeft}, \param{const wxGridCellCoords \& }{bottomRight}}
This function returns the rectangle that encloses the block of cells
limited by TopLeft and BottomRight cell in device coords and clipped
\membersection{wxGrid::CanDragColMove}\label{wxgridcandragcolmove}
-\func{bool}{CanDragColMove}{\void}
+\constfunc{bool}{CanDragColMove}{\void}
Returns true if columns can be moved by dragging with the mouse. Columns can be moved
by dragging on their labels.
\membersection{wxGrid::CanDragColSize}\label{wxgridcandragcolsize}
-\func{bool}{CanDragColSize}{\void}
+\constfunc{bool}{CanDragColSize}{\void}
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
\membersection{wxGrid::CanDragRowSize}\label{wxgridcandragrowsize}
-\func{bool}{CanDragRowSize}{\void}
+\constfunc{bool}{CanDragRowSize}{\void}
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
\membersection{wxGrid::CanDragGridSize}\label{wxgridcandraggridsize}
-\func{bool}{CanDragGridSize}{\void}
+\constfunc{bool}{CanDragGridSize}{\void}
Return true if the dragging of grid lines to resize rows and columns is enabled or false otherwise.
\membersection{wxGrid::CanHaveAttributes}\label{wxgridcanhaveattributes}
-\func{bool}{CanHaveAttributes}{\void}
+\constfunc{bool}{CanHaveAttributes}{\void}
Do we have some place to store attributes in?
\membersection{wxGrid::CellToRect}\label{wxgridcelltorect}
-\func{wxRect}{CellToRect}{\param{int }{row}, \param{int }{col}}
+\constfunc{wxRect}{CellToRect}{\param{int }{row}, \param{int }{col}}
-\func{wxRect}{CellToRect}{\param{const wxGridCellCoords\& }{coords}}
+\constfunc{wxRect}{CellToRect}{\param{const wxGridCellCoords\& }{coords}}
Return the rectangle corresponding to the grid cell's size and position in logical
coordinates.
BeginBatch and EndBatch calls to avoid screen flicker. The final EndBatch will
cause the grid to be repainted.
+\wxheading{See also}
+
+\helpref{wxGridUpdateLocker}{wxgridupdatelocker}
+
\membersection{wxGrid::Fit}\label{wxgridfit}
\membersection{wxGrid::GetBatchCount}\label{wxgridgetbatchcount}
-\func{int}{GetBatchCount}{\void}
+\constfunc{int}{GetBatchCount}{\void}
Returns the number of times that \helpref{wxGrid::BeginBatch}{wxgridbeginbatch} has been called
without (yet) matching calls to \helpref{wxGrid::EndBatch}{wxgridendbatch}. While
\membersection{wxGrid::GetCellAlignment}\label{wxgridgetcellalignment}
-\func{void}{GetCellAlignment}{\param{int }{row}, \param{int }{col}, \param{int* }{horiz}, \param{int* }{vert}}
+\constfunc{void}{GetCellAlignment}{\param{int }{row}, \param{int }{col}, \param{int* }{horiz}, \param{int* }{vert}}
Sets the arguments to the horizontal and vertical text alignment values for the
grid cell at the specified location.
\membersection{wxGrid::GetCellBackgroundColour}\label{wxgridgetcellbackgroundcolour}
-\func{wxColour}{GetCellBackgroundColour}{\param{int }{row}, \param{int }{col}}
+\constfunc{wxColour}{GetCellBackgroundColour}{\param{int }{row}, \param{int }{col}}
Returns the background colour of the cell at the specified location.
\membersection{wxGrid::GetCellEditor}\label{wxgridgetcelleditor}
-\func{wxGridCellEditor*}{GetCellEditor}{\param{int }{row}, \param{int }{col}}
+\constfunc{wxGridCellEditor*}{GetCellEditor}{\param{int }{row}, \param{int }{col}}
Returns a pointer to the editor for the cell at the specified location.
\membersection{wxGrid::GetCellFont}\label{wxgridgetcellfont}
-\func{wxFont}{GetCellFont}{\param{int }{row}, \param{int }{col}}
+\constfunc{wxFont}{GetCellFont}{\param{int }{row}, \param{int }{col}}
Returns the font for text in the grid cell at the specified location.
\membersection{wxGrid::GetCellRenderer}\label{wxgridgetcellrenderer}
-\func{wxGridCellRenderer*}{GetCellRenderer}{\param{int }{row}, \param{int }{col}}
+\constfunc{wxGridCellRenderer*}{GetCellRenderer}{\param{int }{row}, \param{int }{col}}
Returns a pointer to the renderer for the grid cell at the specified location.
\membersection{wxGrid::GetCellTextColour}\label{wxgridgetcelltextcolour}
-\func{wxColour}{GetCellTextColour}{\param{int }{row}, \param{int }{col}}
+\constfunc{wxColour}{GetCellTextColour}{\param{int }{row}, \param{int }{col}}
Returns the text colour for the grid cell at the specified location.
\membersection{wxGrid::GetCellValue}\label{wxgridgetcellvalue}
-\func{wxString}{GetCellValue}{\param{int }{row}, \param{int }{col}}
+\constfunc{wxString}{GetCellValue}{\param{int }{row}, \param{int }{col}}
-\func{wxString}{GetCellValue}{\param{const wxGridCellCoords\&}{coords}}
+\constfunc{wxString}{GetCellValue}{\param{const wxGridCellCoords\&}{coords}}
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
\membersection{wxGrid::GetColLabelAlignment}\label{wxgridgetcollabelalignment}
-\func{void}{GetColLabelAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
+\constfunc{void}{GetColLabelAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
Sets the arguments to the current column label alignment values.
\membersection{wxGrid::GetColLabelSize}\label{wxgridgetcollabelsize}
-\func{int}{GetColLabelSize}{\void}
+\constfunc{int}{GetColLabelSize}{\void}
Returns the current height of the column labels.
\membersection{wxGrid::GetColLabelValue}\label{wxgridgetcollabelvalue}
-\func{wxString}{GetColLabelValue}{\param{int }{col}}
+\constfunc{wxString}{GetColLabelValue}{\param{int }{col}}
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
\membersection{wxGrid::GetColMinimalAcceptableWidth}\label{wxgridgetcolminimalacceptablewidth}
-\func{int}{GetColMinimalAcceptableWidth}{}
+\constfunc{int}{GetColMinimalAcceptableWidth}{}
This returns the value of the lowest column width that can be handled correctly. See
member \helpref{SetColMinimalAcceptableWidth}{wxgridsetcolminimalacceptablewidth} for details.
\membersection{wxGrid::GetColSize}\label{wxgridgetcolsize}
-\func{int}{GetColSize}{\param{int }{col}}
+\constfunc{int}{GetColSize}{\param{int }{col}}
Returns the width of the specified column.
\membersection{wxGrid::GetDefaultCellAlignment}\label{wxgridgetdefaultcellalignment}
-\func{void}{GetDefaultCellAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
+\constfunc{void}{GetDefaultCellAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
Sets the arguments to the current default horizontal and vertical text alignment
values.
\membersection{wxGrid::GetDefaultCellBackgroundColour}\label{wxgridgetdefaultcellbackgroundcolour}
-\func{wxColour}{GetDefaultCellBackgroundColour}{\void}
+\constfunc{wxColour}{GetDefaultCellBackgroundColour}{\void}
Returns the current default background colour for grid cells.
\membersection{wxGrid::GetDefaultCellFont}\label{wxgridgetdefaultcellfont}
-\func{wxFont}{GetDefaultCellFont}{\void}
+\constfunc{wxFont}{GetDefaultCellFont}{\void}
Returns the current default font for grid cell text.
\membersection{wxGrid::GetDefaultCellTextColour}\label{wxgridgetdefaultcelltextcolour}
-\func{wxColour}{GetDefaultCellTextColour}{\void}
+\constfunc{wxColour}{GetDefaultCellTextColour}{\void}
Returns the current default colour for grid cell text.
\membersection{wxGrid::GetDefaultColLabelSize}\label{wxgridgetdefaultcollabelsize}
-\func{int}{GetDefaultColLabelSize}{\void}
+\constfunc{int}{GetDefaultColLabelSize}{\void}
Returns the default height for column labels.
\membersection{wxGrid::GetDefaultColSize}\label{wxgridgetdefaultcolsize}
-\func{int}{GetDefaultColSize}{\void}
+\constfunc{int}{GetDefaultColSize}{\void}
Returns the current default width for grid columns.
\membersection{wxGrid::GetDefaultRowLabelSize}\label{wxgridgetdefaultrowlabelsize}
-\func{int}{GetDefaultRowLabelSize}{\void}
+\constfunc{int}{GetDefaultRowLabelSize}{\void}
Returns the default width for the row labels.
\membersection{wxGrid::GetDefaultRowSize}\label{wxgridgetdefaultrowsize}
-\func{int}{GetDefaultRowSize}{\void}
+\constfunc{int}{GetDefaultRowSize}{\void}
Returns the current default height for grid rows.
\membersection{wxGrid::GetGridCursorCol}\label{wxgridgetgridcursorcol}
-\func{int}{GetGridCursorCol}{\void}
+\constfunc{int}{GetGridCursorCol}{\void}
Returns the current grid cell column position.
\membersection{wxGrid::GetGridCursorRow}\label{wxgridgetgridcursorrow}
-\func{int}{GetGridCursorRow}{\void}
+\constfunc{int}{GetGridCursorRow}{\void}
Returns the current grid cell row position.
\membersection{wxGrid::GetGridLineColour}\label{wxgridgetgridlinecolour}
-\func{wxColour}{GetGridLineColour}{\void}
+\constfunc{wxColour}{GetGridLineColour}{\void}
Returns the colour used for grid lines.
+\wxheading{See also}
+
+\helpref{GetDefaultGridLinePen()}{wxgridgetdefaultgridlinepen}
+
+
+\membersection{wxGrid::GetDefaultGridLinePen}\label{wxgridgetdefaultgridlinepen}
+
+\func{wxPen}{GetDefaultGridLinePen}{\void}
+
+Returns the pen used for grid lines. This virtual function may be overridden in
+derived classes in order to change the appearance of grid lines. Note that
+currently the pen width must be $1$.
+
+\wxheading{See also}
+
+\helpref{GetColGridLinePen()}{wxgridgetcolgridlinepen},\\
+\helpref{GetRowGridLinePen()}{wxgridgetrowgridlinepen}
+
+
+
+
+\membersection{wxGrid::GetRowGridLinePen}\label{wxgridgetrowgridlinepen}
+
+\func{wxPen}{GetRowGridLinePen}{\param{int }{row}}
+
+Returns the pen used for horizontal grid lines. This virtual function may be
+overridden in derived classes in order to change the appearance of individual
+grid line for the given row \arg{row}.
+
+Example: \\
+\\
+\begin{verbatim}
+ // in a grid displaying music notation, use a solid black pen between
+ // octaves (C0=row 127, C1=row 115 etc.)
+ wxPen MidiGrid::GetRowGridLinePen(int row)
+ {
+ if ( row%12 == 7 )
+ return wxPen(*wxBLACK, 1, wxSOLID);
+ else
+ return GetDefaultGridLinePen();
+ }
+\end{verbatim}
+
+
+
+\membersection{wxGrid::GetColGridLinePen}\label{wxgridgetcolgridlinepen}
+
+\func{wxPen}{GetColGridLinePen}{\param{int }{col}}
+
+Returns the pen used for vertical grid lines. This virtual function may be
+overridden in derived classes in order to change the appearance of individual
+grid lines for the given column \arg{col}.
+
+See \helpref{GetRowGridLinePen()}{wxgridgetrowgridlinepen} for an example.
+
+
\membersection{wxGrid::GridLinesEnabled}\label{wxgridgridlinesenabled}
-\func{bool}{GridLinesEnabled}{\void}
+\constfunc{bool}{GridLinesEnabled}{\void}
Returns true if drawing of grid lines is turned on, false otherwise.
\membersection{wxGrid::GetLabelBackgroundColour}\label{wxgridgetlabelbackgroundcolour}
-\func{wxColour}{GetLabelBackgroundColour}{\void}
+\constfunc{wxColour}{GetLabelBackgroundColour}{\void}
Returns the colour used for the background of row and column labels.
\membersection{wxGrid::GetLabelFont}\label{wxgridgetlabelfont}
-\func{wxFont}{GetLabelFont}{\void}
+\constfunc{wxFont}{GetLabelFont}{\void}
Returns the font used for row and column labels.
\membersection{wxGrid::GetLabelTextColour}\label{wxgridgetlabeltextcolour}
-\func{wxColour}{GetLabelTextColour}{\void}
+\constfunc{wxColour}{GetLabelTextColour}{\void}
Returns the colour used for row and column label text.
\membersection{wxGrid::GetNumberCols}\label{wxgridgetnumbercols}
-\func{int}{GetNumberCols}{\void}
+\constfunc{int}{GetNumberCols}{\void}
Returns the total number of grid columns (actually the number of columns in the underlying grid
table).
\membersection{wxGrid::GetNumberRows}\label{wxgridgetnumberrows}
-\func{int}{GetNumberRows}{\void}
+\constfunc{int}{GetNumberRows}{\void}
Returns the total number of grid rows (actually the number of rows in the underlying grid table).
\membersection{wxGrid::GetRowMinimalAcceptableHeight}\label{wxgridgetrowminimalacceptableheight}
-\func{int}{GetRowMinimalAcceptableHeight}{}
+\constfunc{int}{GetRowMinimalAcceptableHeight}{}
This returns the value of the lowest row width that can be handled correctly. See
member \helpref{SetRowMinimalAcceptableHeight}{wxgridsetrowminimalacceptableheight} for details.
\membersection{wxGrid::GetRowLabelAlignment}\label{wxgridgetrowlabelalignment}
-\func{void}{GetRowLabelAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
+\constfunc{void}{GetRowLabelAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
Sets the arguments to the current row label alignment values.
\membersection{wxGrid::GetRowLabelSize}\label{wxgridgetrowlabelsize}
-\func{int}{GetRowLabelSize}{\void}
+\constfunc{int}{GetRowLabelSize}{\void}
Returns the current width of the row labels.
\membersection{wxGrid::GetRowLabelValue}\label{wxgridgetrowlabelvalue}
-\func{wxString}{GetRowLabelValue}{\param{int }{row}}
+\constfunc{wxString}{GetRowLabelValue}{\param{int }{row}}
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
\membersection{wxGrid::GetRowSize}\label{wxgridgetrowsize}
-\func{int}{GetRowSize}{\param{int }{row}}
+\constfunc{int}{GetRowSize}{\param{int }{row}}
Returns the height of the specified row.
\membersection{wxGrid::GetViewWidth}\label{wxgridgetviewwidth}
-\func{int}{GetViewWidth}{\void}
+\constfunc{int}{GetViewWidth}{\void}
Returned number of whole cols visible.
Hides the in-place cell edit control.
+\membersection{wxGrid::HideColLabels}\label{wxgridhidecollabels}
+
+\func{void}{HideColLabels}{\void}
+
+Hides the column labels by calling \helpref{SetColLabelSize}{wxgridsetcollabelsize}
+with a size of 0. Show labels again by calling that method with
+a width greater than 0.
+
+
+\membersection{wxGrid::HideRowLabels}\label{wxgridhiderowlabels}
+
+\func{void}{HideRowLabels}{\void}
+
+Hides the row labels by calling \helpref{SetRowLabelSize}{wxgridsetrowlabelsize}
+with a size of 0. Show labels again by calling that method with
+a width greater than 0.
+
\membersection{wxGrid::InitColWidths}\label{wxgridinitcolwidths}
\membersection{wxGrid::IsEditable}\label{wxgridiseditable}
-\func{bool}{IsEditable}{\void}
+\constfunc{bool}{IsEditable}{\void}
Returns false if the whole grid has been set as read-only or true otherwise.
See \helpref{wxGrid::EnableEditing}{wxgridenableediting} for more information about
\membersection{wxGrid::IsSelection}\label{wxgridisselection}
-\func{bool}{IsSelection}{\void}
+\constfunc{bool}{IsSelection}{\void}
Returns true if there are currently rows, columns or blocks of cells selected.
\membersection{wxGrid::IsVisible}\label{wxgridisvisible}
-\func{bool}{IsVisible}{\param{int }{row}, \param{int }{col}, \param{bool }{wholeCellVisible = true}}
+\constfunc{bool}{IsVisible}{\param{int }{row}, \param{int }{col}, \param{bool }{wholeCellVisible = true}}
-\func{bool}{IsVisible}{\param{const wxGridCellCoords\& }{coords}, \param{bool }{wholeCellVisible = true}}
+\constfunc{bool}{IsVisible}{\param{const wxGridCellCoords\& }{coords}, \param{bool }{wholeCellVisible = true}}
Returns true if a cell is either wholly visible (the default) or at least partially
visible in the grid window.
\membersection{wxGrid::SelectionToDeviceRect}\label{wxgridselectiontodevicerect}
-\func{wxRect}{SelectionToDeviceRect}{\void}
+\constfunc{wxRect}{SelectionToDeviceRect}{\void}
This function returns the rectangle that encloses the selected cells
in device coords and clipped to the client size of the grid window.
Sets the height of the column labels.
+If \arg{height} equals to \texttt{wxGRID\_AUTOSIZE} then height is calculated automatically
+so that no label is truncated. Note that this could be slow for a large table.
+
\membersection{wxGrid::SetColLabelValue}\label{wxgridsetcollabelvalue}
Sets the width of the row labels.
+If \arg{width} equals \texttt{wxGRID\_AUTOSIZE} then width is calculated automatically
+so that no label is truncated. Note that this could be slow for a large table.
+
\membersection{wxGrid::SetRowLabelValue}\label{wxgridsetrowlabelvalue}
wholly in memory.
+\membersection{wxGrid::SetUseNativeColLabels}\label{wxgridsetsenativecollabels}
+
+\func{void}{SetUseNativeColLabels}{\param{bool }{native= true}}
+
+Call this in order to make the column labels use a native look by using
+\helpref{wxRenderer::DrawHeaderButton}{wxrenderernativedrawheaderbutton}
+internally. There is no equivalent method for drawing row columns as
+there is not native look for that. This option is useful when using
+wxGrid for displaying tables and not as a spread-sheet.
\membersection{wxGrid::ShowCellEditControl}\label{wxgridshowcelleditcontrol}
\membersection{wxGrid::XToCol}\label{wxgridxtocol}
-\func{int}{XToCol}{\param{int }{x}, \param{bool }{clipToMinMax = false}}
+\constfunc{int}{XToCol}{\param{int }{x}, \param{bool }{clipToMinMax = false}}
\wxheading{Parameters}
\docparam{x}{The x position to evaluate.}
\membersection{wxGrid::XToEdgeOfCol}\label{wxgridxtoedgeofcol}
-\func{int}{XToEdgeOfCol}{\param{int }{x}}
+\constfunc{int}{XToEdgeOfCol}{\param{int }{x}}
Returns the column whose right hand edge is close to the given logical x position.
If no column edge is near to this position {\tt wxNOT\_FOUND} is returned.
\membersection{wxGrid::YToEdgeOfRow}\label{wxgridytoedgeofrow}
-\func{int}{YToEdgeOfRow}{\param{int }{y}}
+\constfunc{int}{YToEdgeOfRow}{\param{int }{y}}
Returns the row whose bottom edge is close to the given logical y position.
If no row edge is near to this position {\tt wxNOT\_FOUND} is returned.
\membersection{wxGrid::YToRow}\label{wxgridytorow}
-\func{int}{YToRow}{\param{int }{y}}
+\constfunc{int}{YToRow}{\param{int }{y}}
Returns the grid row that corresponds to the logical y coordinate. Returns
{\tt wxNOT\_FOUND} if there is no row at the y position.