\wxheading{Event handling}
+\input gridevt.inc
+
+The event handler for the following functions takes a
+ \helpref{wxGridSizeEvent}{wxgridsizeevent} parameter.
+
+\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\_ROW\_SIZE(func)}}{The user resized a row by dragging it. Processes a wxEVT\_GRID\_ROW\_SIZE.}
+\end{twocollist}%
+
+The event handler for the following functions takes a
+ \helpref{wxGridRangeSelectEvent}{wxgridrangeselectevent} parameter.
+
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf EVT\_GRID\_RANGE\_SELECT(func)}}{The user selected a group of contiguous cells. Processes a wxEVT\_GRID\_RANGE\_SELECT.}
+\end{twocollist}%
+
+The event handler for the following functions takes a
+ \helpref{wxGridEditorCreatedEvent}{wxgrideditorcreatedevent} parameter.
+
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf EVT\_GRID\_EDITOR\_CREATED(func)}}{The editor for a cell was created. Processes a wxEVT\_GRID\_EDITOR\_CREATED.}
+\end{twocollist}%
+
\wxheading{See also}
\helpref{wxGrid overview}{gridoverview}
\func{void}{EnableCellEditControl}{\param{bool }{enable = TRUE}}
Enables or disables in-place editing of grid cell data. The grid will issue either a
-wxEVT_GRID_EDITOR_SHOWN or wxEVT_GRID_EDITOR_HIDDEN event.
+wxEVT\_GRID\_EDITOR\_SHOWN or wxEVT\_GRID\_EDITOR\_HIDDEN event.
\membersection{wxGrid::EnableDragColSize}\label{wxgridenabledragcolsize}
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.
+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.
\membersection{wxGrid::GetCellBackgroundColour}\label{wxgridgetcellbackgroundcolour}
Sets the horizontal and vertial 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.
+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.
\membersection{wxGrid::SetCellEditor}\label{wxgridsetcelleditor}
\membersection{wxGrid::SetCellFont}\label{wxgridsetcellfont}
-\func{void}{SetCellFont}{\param{int }{row}, \param{int }{col}, \param{const }{wxFont\&}}
+\func{void}{SetCellFont}{\param{int }{row}, \param{int }{col}, \param{const wxFont\&}{ font}}
Sets the font for text in the grid cell at the specified location.
\membersection{wxGrid::SetCellTextColour}\label{wxgridsetcelltextcolour}
-\func{void}{SetCellTextColour}{\param{int }{row}, \param{int }{col}, \param{const }{wxColour\&}}
+\func{void}{SetCellTextColour}{\param{int }{row}, \param{int }{col}, \param{const wxColour\&}{ colour}}
\func{void}{SetCellTextColour}{\param{const wxColour\& }{val}, \param{int }{row}, \param{int }{col}}
-\func{void}{SetCellTextColour}{\param{const wxColour\& }{col}}
+\func{void}{SetCellTextColour}{\param{const wxColour\& }{colour}}
Sets the text colour for the grid cell at the specified location.
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.
+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.
\membersection{wxGrid::SetColLabelSize}\label{wxgridsetcollabelsize}
\membersection{wxGrid::SetColLabelValue}\label{wxgridsetcollabelvalue}
-\func{void}{SetColLabelValue}{\param{int }{col}, \param{const }{wxString\&}}
+\func{void}{SetColLabelValue}{\param{int }{col}, \param{const wxString\&}{ value}}
Set the value for the given column label. If you are using a derived grid table you must
override \helpref{wxGridTableBase::SetColLabelValue}{wxgridtablebasesetcollabelvalue}
Sets the default horizontal and vertial 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.
+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.
\membersection{wxGrid::SetDefaultCellBackgroundColour}\label{wxgridsetdefaultcellbackgroundcolour}
-\func{void}{SetDefaultCellBackgroundColour}{\param{const }{wxColour\&}}
+\func{void}{SetDefaultCellBackgroundColour}{\param{const wxColour\&}{ colour}}
Sets the default background colour for grid cells.
\membersection{wxGrid::SetDefaultCellFont}\label{wxgridsetdefaultcellfont}
-\func{void}{SetDefaultCellFont}{\param{const }{wxFont\&}}
+\func{void}{SetDefaultCellFont}{\param{const wxFont\&}{ font}}
Sets the default font to be used for grid cell text.
\membersection{wxGrid::SetGridLineColour}\label{wxgridsetgridlinecolour}
-\func{void}{SetGridLineColour}{\param{const }{wxColour\&}}
+\func{void}{SetGridLineColour}{\param{const wxColour\&}{colour}}
Sets the colour used to draw grid lines.
\membersection{wxGrid::SetLabelBackgroundColour}\label{wxgridsetlabelbackgroundcolour}
-\func{void}{SetLabelBackgroundColour}{\param{const }{wxColour\&}}
+\func{void}{SetLabelBackgroundColour}{\param{const wxColour\&}{ colour}}
Sets the background colour for row and column labels.
\membersection{wxGrid::SetLabelFont}\label{wxgridsetlabelfont}
-\func{void}{SetLabelFont}{\param{const }{wxFont\&}}
+\func{void}{SetLabelFont}{\param{const wxFont\&}{ font}}
Sets the font for row and column labels.
\membersection{wxGrid::SetLabelTextColour}\label{wxgridsetlabeltextcolour}
-\func{void}{SetLabelTextColour}{\param{const }{wxColour\&}}
+\func{void}{SetLabelTextColour}{\param{const wxColour\&}{ colour}}
Sets the colour for row and column label text.
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.
+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.
\membersection{wxGrid::SetRowLabelSize}\label{wxgridsetrowlabelsize}
\membersection{wxGrid::SetRowLabelValue}\label{wxgridsetrowlabelvalue}
-\func{void}{SetRowLabelValue}{\param{int }{row}, \param{const }{wxString\&}}
+\func{void}{SetRowLabelValue}{\param{int }{row}, \param{const wxString\&}{ value}}
Set the value for the given row label. If you are using a derived grid table you must
-override \helpref{wxGridTableBase::SetRowLabelValue}{wxgridtablebasesetrowlabelvalue}
+override \helpref{wxGridTableBase::SetRowLabelValue}{wxgridtablebasesetrowlabelvalue}
for this to have any effect.
\membersection{wxGrid::SetRowMinimalHeight}\label{wxgridsetrowminimalheight}
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.
-\wxheading{Note}\\
+\wxheading{Note}
+
wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
The memory requirements for this could become prohibitive if your grid is very large.
\membersection{wxGrid::SetSelectionMode}\label{wxgridsetselectionmode}
-\func{void}{SetSelectionMode}{\param{wxGrid::wxGridSelectionModes}{selmode}}
+\func{void}{SetSelectionMode}{\param{wxGrid::wxGridSelectionModes}{ selmode}}
Set the selection behaviour of the grid.
\docparam{wxGrid::wxGridSelectCells}{The default mode where individual cells are selected.}
-\docparam(wxGrid::wxGridSelectRows}{Selections will consist of whole rows.}
+\docparam{wxGrid::wxGridSelectRows}{Selections will consist of whole rows.}
\docparam{wxGrid::wxGridSelectionColumns}{Selections will consist of whole columns.}
\func{int}{XToCol}{\param{int }{x}}
Returns the grid column that corresponds to the logical x coordinate. Returns
-wxNOT_FOUND if there is no column at the x position.
+wxNOT\_FOUND if there is no column at the x position.
\membersection{wxGrid::XToEdgeOfCol}\label{wxgridxtoedgeofcol}
\func{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 wxNOT_FOUND is returned.
+If no column edge is near to this position wxNOT\_FOUND is returned.
\membersection{wxGrid::YToEdgeOfRow}\label{wxgridytoedgeofrow}
\func{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 wxNOT_FOUND is returned.
+If no row edge is near to this position wxNOT\_FOUND is returned.
\membersection{wxGrid::YToRow}\label{wxgridytorow}
\func{int}{YToRow}{\param{int }{y}}
Returns the grid row that corresponds to the logical y coordinate. Returns
-wxNOT_FOUND if there is no row at the y position.
+wxNOT\_FOUND if there is no row at the y position.
Methods for a registry for mapping data types to Renderers/Editors
-
\membersection{wxGrid::GetDefaultEditorForCell}\label{wxgridgetdefaulteditorforcell}
\constfunc{wxGridCellEditor*}{GetDefaultEditorForCell}{\param{int }{row}, \param{int }{col}}
\func{void}{SetMargins}{\param{int }{extraWidth}, \param{int }{extraHeight}}
-grid may occupy more space than needed for its rows/columns, this
+A grid may occupy more space than needed for its rows/columns. This
function allows to set how big this extra space is
\membersection{wxGrid::wxGrid}\label{wxgridwxgrid}
Backward compatibility.
-GetRowHeight() is below
-returned num whole rows visible.
-
\membersection{wxGrid::GetViewWidth}\label{wxgridgetviewwidth}
\func{int}{GetViewWidth}{\void}
\func{void}{SetCellBackgroundColour}{\param{const wxColour\& }{col}}
-\func{void}{SetCellBackgroundColour}{\param{int }{row}, \param{int }{col}, \param{const }{wxColour\&}}
+\func{void}{SetCellBackgroundColour}{\param{int }{row}, \param{int }{col}, \param{const wxColour\&}{ colour}}
\func{void}{SetCellBackgroundColour}{\param{const wxColour\& }{colour}, \param{int }{row}, \param{int }{col}}
\membersection{wxGrid::GetOrCreateCellAttr}\label{wxgridgetorcreatecellattr}
\constfunc{wxGridCellAttr*}{GetOrCreateCellAttr}{\param{int }{row}, \param{int }{col}}
+