1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 %% Modified by: Santiago Palacios
8 %% Copyright: (c) wxWidgets
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxGrid
}}\label{wxgrid
}
14 wxGrid and its related classes are used for displaying and editing tabular
15 data. They provide a rich set of features for display, editing, and
16 interacting with a variety of data sources. For simple applications, and to
17 help you get started, wxGrid is the only class you need to refer to
18 directly. It will set up default instances of the other classes and manage
19 them for you. For more complex applications you can derive your own
20 classes for custom grid views, grid data tables, cell editors and
21 renderers. The
\helpref{wxGrid classes overview
}{gridoverview
} has
22 examples of simple and more complex applications, explains the
23 relationship between the various grid classes and has a summary of the
24 keyboard shortcuts and mouse functions provided by wxGrid.
26 wxGrid has been greatly expanded and redesigned for wxWidgets
2.2
27 onwards. If you have been using the old wxGrid class you will probably
28 want to have a look at the
\helpref{wxGrid classes overview
}{gridoverview
} to see
29 how things have changed. The new grid classes are reasonably backward-compatible
30 but there are some exceptions. There are also easier ways of doing many things compared to
31 the previous implementation.
33 \wxheading{Derived from
}
35 \helpref{wxScrolledWindow
}{wxscrolledwindow
}\\
36 \helpref{wxWindow
}{wxwindow
}\\
37 \helpref{wxEvtHandler
}{wxevthandler
}\\
38 \helpref{wxObject
}{wxobject
}
40 \wxheading{Include files
}
46 \helpref{wxAdv
}{librarieslist
}
48 \wxheading{Window styles
}
50 There are presently no specific window styles for wxGrid.
52 \wxheading{Event handling
}
56 The event handler for the following functions takes a
57 \helpref{wxGridSizeEvent
}{wxgridsizeevent
} parameter.
58 The ...
\_CMD\_... variants also take a window identifier.
61 \begin{twocollist
}\itemsep=
0pt
62 \twocolitem{{\bf EVT
\_GRID\_COL\_SIZE(func)
}}{The user resized a column by dragging it. Processes a wxEVT
\_GRID\_COL\_SIZE.
}
63 \twocolitem{{\bf EVT
\_GRID\_ROW\_SIZE(func)
}}{The user resized a row by dragging it. Processes a wxEVT
\_GRID\_ROW\_SIZE.
}
64 \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.
}
65 \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.
}
68 The event handler for the following functions takes a
69 \helpref{wxGridRangeSelectEvent
}{wxgridrangeselectevent
} parameter.
70 The ...
\_CMD\_... variant also takes a window identifier.
73 \begin{twocollist
}\itemsep=
0pt
74 \twocolitem{{\bf EVT
\_GRID\_RANGE\_SELECT(func)
}}{The user selected a group of contiguous cells. Processes a wxEVT
\_GRID\_RANGE\_SELECT.
}
75 \twocolitem{{\bf EVT
\_GRID\_CMD\_RANGE\_SELECT(id, func)
}}{The user selected a group of contiguous cells; variant taking a window identifier. Processes a wxEVT
\_GRID\_RANGE\_SELECT.
}
78 The event handler for the following functions takes a
79 \helpref{wxGridEditorCreatedEvent
}{wxgrideditorcreatedevent
} parameter.
80 The ...
\_CMD\_... variant also takes a window identifier.
83 \begin{twocollist
}\itemsep=
0pt
84 \twocolitem{{\bf EVT
\_GRID\_EDITOR\_CREATED(func)
}}{The editor for a cell was created. Processes a wxEVT
\_GRID\_EDITOR\_CREATED.
}
85 \twocolitem{{\bf EVT
\_GRID\_CMD\_EDITOR\_CREATED(id, func)
}}{The editor for a cell was created; variant taking a window identifier. Processes a wxEVT
\_GRID\_EDITOR\_CREATED.
}
90 \helpref{wxGrid overview
}{gridoverview
}
92 %%%%%%%%%%% FUNCTION GROUPS %%%%%%%%%%%%%
93 \latexignore{\rtfignore{\wxheading{Function groups
}}}
97 \membersection{Constructors and initialization
}\label{wxgridconstructors
}
99 \helpref{wxGrid
}{wxgridctor
}\\
100 \helpref{\destruct{wxGrid
}}{wxgriddtor
}\\
101 \helpref{CreateGrid
}{wxgridcreategrid
}\\
102 \helpref{SetTable
}{wxgridsettable
}
106 \membersection{Display format
}\label{wxgriddisplayformat
}
110 \membersection{Selection functions
}\label{wxgridselectionfunctions
}
112 \helpref{wxGrid::ClearSelection
}{wxgridclearselection
}\\
113 \helpref{wxGrid::IsSelection
}{wxgridisselection
}\\
114 \helpref{wxGrid::SelectAll
}{wxgridselectall
}\\
115 \helpref{wxGrid::SelectBlock
}{wxgridselectblock
}\\
116 \helpref{wxGrid::SelectCol
}{wxgridselectcol
}\\
117 \helpref{wxGrid::SelectRow
}{wxgridselectrow
}
119 %%%%%%%%% MEMBER FUNCTIONS %%%%%%%%%%
120 \helponly{\insertatlevel{2}{
128 \membersection{wxGrid::wxGrid
}\label{wxgridctor
}
130 \func{}{wxGrid
}{\void}
134 \func{}{wxGrid
}{\param{wxWindow*
}{parent
},
\param{wxWindowID
}{id
},
\param{const wxPoint\&
}{pos = wxDefaultPosition
},
\param{const wxSize\&
}{size = wxDefaultSize
},
\param{long
}{style = wxWANTS
\_CHARS},
\param{const wxString\&
}{name = wxPanelNameStr
}}
136 Constructor to create a grid object. Call either
\helpref{wxGrid::CreateGrid
}{wxgridcreategrid
} or
137 \helpref{wxGrid::SetTable
}{wxgridsettable
} directly after this to initialize the grid before using
142 \membersection{wxGrid::
\destruct{wxGrid
}}\label{wxgriddtor
}
144 \func{}{\destruct{wxGrid
}}{\void}
146 Destructor. This will also destroy the associated grid table unless you passed a table
147 object to the grid and specified that the grid should not take ownership of the
148 table (see
\helpref{wxGrid::SetTable
}{wxgridsettable
}).
152 \membersection{wxGrid::AppendCols
}\label{wxgridappendcols
}
154 \func{bool
}{AppendCols
}{\param{int
}{numCols =
1},
\param{bool
}{updateLabels = true
}}
156 Appends one or more new columns to the right of the grid and returns true if
157 successful. The updateLabels argument is not used at present.
159 If you are using a derived grid table class you will need to override
160 \helpref{wxGridTableBase::AppendCols
}{wxgridtablebaseappendcols
}. See
161 \helpref{wxGrid::InsertCols
}{wxgridinsertcols
} for further information.
165 \membersection{wxGrid::AppendRows
}\label{wxgridappendrows
}
167 \func{bool
}{AppendRows
}{\param{int
}{numRows =
1},
\param{bool
}{updateLabels = true
}}
169 Appends one or more new rows to the bottom of the grid and returns true if
170 successful. The updateLabels argument is not used at present.
172 If you are using a derived grid table class you will need to override
173 \helpref{wxGridTableBase::AppendRows
}{wxgridtablebaseappendrows
}. See
174 \helpref{wxGrid::InsertRows
}{wxgridinsertrows
} for further information.
178 \membersection{wxGrid::AutoSize
}\label{wxgridautosize
}
180 \func{void
}{AutoSize
}{\void}
182 Automatically sets the height and width of all rows and columns to fit their contents.
185 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
186 The memory requirements for this could become prohibitive if your grid is very large.
190 \membersection{wxGrid::AutoSizeColLabelSize
}\label{wxgridautosizecollabelsize
}
192 \func{void
}{AutoSizeColLabelSize
}{\param{int
}{col
}}
194 Automatically adjusts width of the column to fit its label.
198 \membersection{wxGrid::AutoSizeColumn
}\label{wxgridautosizecolumn
}
200 \func{void
}{AutoSizeColumn
}{\param{int
}{col
},
\param{bool
}{setAsMin = true
}}
202 Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will
203 also be set as the minimal width for the column.
206 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
207 The memory requirements for this could become prohibitive if your grid is very large.
211 \membersection{wxGrid::AutoSizeColumns
}\label{wxgridautosizecolumns
}
213 \func{void
}{AutoSizeColumns
}{\param{bool
}{setAsMin = true
}}
215 Automatically sizes all columns to fit their contents. If setAsMin is true the calculated widths will
216 also be set as the minimal widths for the columns.
219 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
220 The memory requirements for this could become prohibitive if your grid is very large.
224 \membersection{wxGrid::AutoSizeRow
}\label{wxgridautosizerow
}
226 \func{void
}{AutoSizeRow
}{\param{int
}{row
},
\param{bool
}{setAsMin = true
}}
228 Automatically sizes the row to fit its contents. If setAsMin is true the calculated height will
229 also be set as the minimal height for the row.
232 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
233 The memory requirements for this could become prohibitive if your grid is very large.
237 \membersection{wxGrid::AutoSizeRowLabelSize
}\label{wxgridautosizerowlabelsize
}
239 \func{void
}{AutoSizeRowLabelSize
}{\param{int
}{col
}}
241 Automatically adjusts height of the row to fit its label.
245 \membersection{wxGrid::AutoSizeRows
}\label{wxgridautosizerows
}
247 \func{void
}{AutoSizeRows
}{\param{bool
}{setAsMin = true
}}
249 Automatically sizes all rows to fit their contents. If setAsMin is true the calculated heights will
250 also be set as the minimal heights for the rows.
253 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
254 The memory requirements for this could become prohibitive if your grid is very large.
258 \membersection{wxGrid::BeginBatch
}\label{wxgridbeginbatch
}
260 \func{void
}{BeginBatch
}{\void}
262 Increments the grid's batch count. When the count is greater than zero repainting of
263 the grid is suppressed. Each call to BeginBatch must be matched by a later call to
264 \helpref{wxGrid::EndBatch
}{wxgridendbatch
}. Code that does a lot of grid
265 modification can be enclosed between BeginBatch and EndBatch calls to avoid
266 screen flicker. The final EndBatch will cause the grid to be repainted.
270 \helpref{wxGridUpdateLocker
}{wxgridupdatelocker
}
274 \membersection{wxGrid::BlockToDeviceRect
}\label{wxgridblocktodevicerect
}
276 \constfunc{wxRect
}{BlockToDeviceRect
}{\param{const wxGridCellCoords \&
}{topLeft
},
\param{const wxGridCellCoords \&
}{bottomRight
}}
278 This function returns the rectangle that encloses the block of cells
279 limited by TopLeft and BottomRight cell in device coords and clipped
280 to the client size of the grid window.
284 \membersection{wxGrid::CanDragColMove
}\label{wxgridcandragcolmove
}
286 \constfunc{bool
}{CanDragColMove
}{\void}
288 Returns true if columns can be moved by dragging with the mouse. Columns can be moved
289 by dragging on their labels.
293 \membersection{wxGrid::CanDragColSize
}\label{wxgridcandragcolsize
}
295 \constfunc{bool
}{CanDragColSize
}{\void}
297 Returns true if columns can be resized by dragging with the mouse. Columns can be resized
298 by dragging the edges of their labels. If grid line dragging is enabled they can also be
299 resized by dragging the right edge of the column in the grid cell area
300 (see
\helpref{wxGrid::EnableDragGridSize
}{wxgridenabledraggridsize
}).
304 \membersection{wxGrid::CanDragRowSize
}\label{wxgridcandragrowsize
}
306 \constfunc{bool
}{CanDragRowSize
}{\void}
308 Returns true if rows can be resized by dragging with the mouse. Rows can be resized
309 by dragging the edges of their labels. If grid line dragging is enabled they can also be
310 resized by dragging the lower edge of the row in the grid cell area
311 (see
\helpref{wxGrid::EnableDragGridSize
}{wxgridenabledraggridsize
}).
315 \membersection{wxGrid::CanDragGridSize
}\label{wxgridcandraggridsize
}
317 \constfunc{bool
}{CanDragGridSize
}{\void}
319 Return true if the dragging of grid lines to resize rows and columns is enabled or false otherwise.
323 \membersection{wxGrid::CanEnableCellControl
}\label{wxgridcanenablecellcontrol
}
325 \constfunc{bool
}{CanEnableCellControl
}{\void}
327 Returns true if the in-place edit control for the current grid cell can be used and
328 false otherwise (e.g. if the current cell is read-only).
332 \membersection{wxGrid::CanHaveAttributes
}\label{wxgridcanhaveattributes
}
334 \constfunc{bool
}{CanHaveAttributes
}{\void}
336 Do we have some place to store attributes in?
340 \membersection{wxGrid::CellToRect
}\label{wxgridcelltorect
}
342 \constfunc{wxRect
}{CellToRect
}{\param{int
}{row
},
\param{int
}{col
}}
344 \constfunc{wxRect
}{CellToRect
}{\param{const wxGridCellCoords\&
}{coords
}}
346 Return the rectangle corresponding to the grid cell's size and position in logical
351 \membersection{wxGrid::ClearGrid
}\label{wxgridcleargrid
}
353 \func{void
}{ClearGrid
}{\void}
355 Clears all data in the underlying grid table and repaints the grid. The table is not deleted by
356 this function. If you are using a derived table class then you need to override
357 \helpref{wxGridTableBase::Clear
}{wxgridtablebaseclear
} for this function to have any effect.
361 \membersection{wxGrid::ClearSelection
}\label{wxgridclearselection
}
363 \func{void
}{ClearSelection
}{\void}
365 Deselects all cells that are currently selected.
369 \membersection{wxGrid::CreateGrid
}\label{wxgridcreategrid
}
371 \func{bool
}{CreateGrid
}{\param{int
}{numRows
},
\param{int
}{numCols
},
\param{wxGrid::wxGridSelectionModes
}{selmode = wxGrid::wxGridSelectCells
}}
373 Creates a grid with the specified initial number of rows and columns.
374 Call this directly after the grid constructor. When you use this
375 function wxGrid will create and manage a simple table of string values
376 for you. All of the grid data will be stored in memory.
378 For applications with more complex data types or relationships, or for
379 dealing with very large datasets, you should derive your own grid table
380 class and pass a table object to the grid with
\helpref{wxGrid::SetTable
}{wxgridsettable
}.
384 \membersection{wxGrid::DeleteCols
}\label{wxgriddeletecols
}
386 \func{bool
}{DeleteCols
}{\param{int
}{pos =
0},
\param{int
}{numCols =
1},
\param{bool
}{updateLabels = true
}}
388 Deletes one or more columns from a grid starting at the specified position and returns
389 true if successful. The updateLabels argument is not used at present.
391 If you are using a derived grid table class you will need to override
392 \helpref{wxGridTableBase::DeleteCols
}{wxgridtablebasedeletecols
}. See
393 \helpref{wxGrid::InsertCols
}{wxgridinsertcols
} for further information.
397 \membersection{wxGrid::DeleteRows
}\label{wxgriddeleterows
}
399 \func{bool
}{DeleteRows
}{\param{int
}{pos =
0},
\param{int
}{numRows =
1},
\param{bool
}{updateLabels = true
}}
401 Deletes one or more rows from a grid starting at the specified position and returns
402 true if successful. The updateLabels argument is not used at present.
404 If you are using a derived grid table class you will need to override
405 \helpref{wxGridTableBase::DeleteRows
}{wxgridtablebasedeleterows
}. See
406 \helpref{wxGrid::InsertRows
}{wxgridinsertrows
} for further information.
410 \membersection{wxGrid::DisableCellEditControl
}\label{wxgriddisablecelleditcontrol
}
412 \func{void
}{DisableCellEditControl
}{\void}
414 Disables in-place editing of grid cells.
415 Equivalent to calling EnableCellEditControl(false).
419 \membersection{wxGrid::DisableDragColMove
}\label{wxgriddisabledragcolmove
}
421 \func{void
}{DisableDragColMove
}{\void}
423 Disables column moving by dragging with the mouse. Equivalent to passing false to
424 \helpref{wxGrid::EnableDragColMove
}{wxgridenabledragcolmove
}.
428 \membersection{wxGrid::DisableDragColSize
}\label{wxgriddisabledragcolsize
}
430 \func{void
}{DisableDragColSize
}{\void}
432 Disables column sizing by dragging with the mouse. Equivalent to passing false to
433 \helpref{wxGrid::EnableDragColSize
}{wxgridenabledragcolsize
}.
437 \membersection{wxGrid::DisableDragGridSize
}\label{wxgriddisabledraggridsize
}
439 \func{void
}{DisableDragGridSize
}{\void}
441 Disable mouse dragging of grid lines to resize rows and columns. Equivalent to passing
442 false to
\helpref{wxGrid::EnableDragGridSize
}{wxgridenabledraggridsize
}
446 \membersection{wxGrid::DisableDragRowSize
}\label{wxgriddisabledragrowsize
}
448 \func{void
}{DisableDragRowSize
}{\void}
450 Disables row sizing by dragging with the mouse. Equivalent to passing false to
451 \helpref{wxGrid::EnableDragRowSize
}{wxgridenabledragrowsize
}.
455 \membersection{wxGrid::EnableCellEditControl
}\label{wxgridenablecelleditcontrol
}
457 \func{void
}{EnableCellEditControl
}{\param{bool
}{enable = true
}}
459 Enables or disables in-place editing of grid cell data. The grid will issue either a
460 wxEVT
\_GRID\_EDITOR\_SHOWN or wxEVT
\_GRID\_EDITOR\_HIDDEN event.
464 \membersection{wxGrid::EnableDragColSize
}\label{wxgridenabledragcolsize
}
466 \func{void
}{EnableDragColSize
}{\param{bool
}{enable = true
}}
468 Enables or disables column sizing by dragging with the mouse.
472 \membersection{wxGrid::EnableDragColMove
}\label{wxgridenabledragcolmove
}
474 \func{void
}{EnableDragColMove
}{\param{bool
}{enable = true
}}
476 Enables or disables column moving by dragging with the mouse.
480 \membersection{wxGrid::EnableDragGridSize
}\label{wxgridenabledraggridsize
}
482 \func{void
}{EnableDragGridSize
}{\param{bool
}{enable = true
}}
484 Enables or disables row and column resizing by dragging gridlines with the mouse.
488 \membersection{wxGrid::EnableDragRowSize
}\label{wxgridenabledragrowsize
}
490 \func{void
}{EnableDragRowSize
}{\param{bool
}{enable = true
}}
492 Enables or disables row sizing by dragging with the mouse.
496 \membersection{wxGrid::EnableEditing
}\label{wxgridenableediting
}
498 \func{void
}{EnableEditing
}{\param{bool
}{edit
}}
500 If the edit argument is false this function sets the whole grid as read-only. If the
501 argument is true the grid is set to the default state where cells may be editable. In the
502 default state you can set single grid cells and whole rows and columns to be editable or
504 \helpref{wxGridCellAttribute::SetReadOnly
}{wxgridcellattrsetreadonly
}. For single
505 cells you can also use the shortcut function
506 \helpref{wxGrid::SetReadOnly
}{wxgridsetreadonly
}.
508 For more information about controlling grid cell attributes see the
509 \helpref{wxGridCellAttr
}{wxgridcellattr
} cell attribute class and the
510 \helpref{wxGrid classes overview
}{gridoverview
}.
514 \membersection{wxGrid::EnableGridLines
}\label{wxgridenablegridlines
}
516 \func{void
}{EnableGridLines
}{\param{bool
}{enable = true
}}
518 Turns the drawing of grid lines on or off.
522 \membersection{wxGrid::EndBatch
}\label{wxgridendbatch
}
524 \func{void
}{EndBatch
}{\void}
526 Decrements the grid's batch count. When the count is greater than zero repainting of
527 the grid is suppressed. Each previous call to
528 \helpref{wxGrid::BeginBatch
}{wxgridbeginbatch
} must be matched by a later call to
529 EndBatch. Code that does a lot of grid modification can be enclosed between
530 BeginBatch and EndBatch calls to avoid screen flicker. The final EndBatch will
531 cause the grid to be repainted.
535 \helpref{wxGridUpdateLocker
}{wxgridupdatelocker
}
539 \membersection{wxGrid::Fit
}\label{wxgridfit
}
541 \func{void
}{Fit
}{\void}
543 Overridden wxWindow method.
547 \membersection{wxGrid::ForceRefresh
}\label{wxgridforcerefresh
}
549 \func{void
}{ForceRefresh
}{\void}
551 Causes immediate repainting of the grid. Use this instead of the usual wxWindow::Refresh.
555 \membersection{wxGrid::GetBatchCount
}\label{wxgridgetbatchcount
}
557 \constfunc{int
}{GetBatchCount
}{\void}
559 Returns the number of times that
\helpref{wxGrid::BeginBatch
}{wxgridbeginbatch
} has been called
560 without (yet) matching calls to
\helpref{wxGrid::EndBatch
}{wxgridendbatch
}. While
561 the grid's batch count is greater than zero the display will not be updated.
565 \membersection{wxGrid::GetCellAlignment
}\label{wxgridgetcellalignment
}
567 \constfunc{void
}{GetCellAlignment
}{\param{int
}{row
},
\param{int
}{col
},
\param{int*
}{horiz
},
\param{int*
}{vert
}}
569 Sets the arguments to the horizontal and vertical text alignment values for the
570 grid cell at the specified location.
572 Horizontal alignment will be one of wxALIGN
\_LEFT, wxALIGN
\_CENTRE or wxALIGN
\_RIGHT. \\
573 Vertical alignment will be one of wxALIGN
\_TOP, wxALIGN
\_CENTRE or wxALIGN
\_BOTTOM.
575 \perlnote{This method only takes the parameters
{\tt row
} and
{\tt col
} and
576 returns a
2-element list
{\tt ( horiz, vert )
}.
}
580 \membersection{wxGrid::GetCellBackgroundColour
}\label{wxgridgetcellbackgroundcolour
}
582 \constfunc{wxColour
}{GetCellBackgroundColour
}{\param{int
}{row
},
\param{int
}{col
}}
584 Returns the background colour of the cell at the specified location.
588 \membersection{wxGrid::GetCellEditor
}\label{wxgridgetcelleditor
}
590 \constfunc{wxGridCellEditor*
}{GetCellEditor
}{\param{int
}{row
},
\param{int
}{col
}}
592 Returns a pointer to the editor for the cell at the specified location.
594 See
\helpref{wxGridCellEditor
}{wxgridcelleditor
} and
595 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
599 \membersection{wxGrid::GetCellFont
}\label{wxgridgetcellfont
}
601 \constfunc{wxFont
}{GetCellFont
}{\param{int
}{row
},
\param{int
}{col
}}
603 Returns the font for text in the grid cell at the specified location.
607 \membersection{wxGrid::GetCellRenderer
}\label{wxgridgetcellrenderer
}
609 \constfunc{wxGridCellRenderer*
}{GetCellRenderer
}{\param{int
}{row
},
\param{int
}{col
}}
611 Returns a pointer to the renderer for the grid cell at the specified location.
613 See
\helpref{wxGridCellRenderer
}{wxgridcellrenderer
} and
614 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
618 \membersection{wxGrid::GetCellTextColour
}\label{wxgridgetcelltextcolour
}
620 \constfunc{wxColour
}{GetCellTextColour
}{\param{int
}{row
},
\param{int
}{col
}}
622 Returns the text colour for the grid cell at the specified location.
626 \membersection{wxGrid::GetCellValue
}\label{wxgridgetcellvalue
}
628 \constfunc{wxString
}{GetCellValue
}{\param{int
}{row
},
\param{int
}{col
}}
630 \constfunc{wxString
}{GetCellValue
}{\param{const wxGridCellCoords\&
}{coords
}}
632 Returns the string contained in the cell at the specified location. For simple applications where a
633 grid object automatically uses a default grid table of string values you use this function together
634 with
\helpref{wxGrid::SetCellValue
}{wxgridsetcellvalue
} to access cell values.
636 For more complex applications where you have derived your own grid table class that contains
637 various data types (e.g. numeric, boolean or user-defined custom types) then you only use this
638 function for those cells that contain string values.
640 See
\helpref{wxGridTableBase::CanGetValueAs
}{wxgridtablebasecangetvalueas
}
641 and the
\helpref{wxGrid overview
}{gridoverview
} for more information.
645 \membersection{wxGrid::GetColAt
}\label{wxgridgetcolat
}
647 \constfunc{int
}{GetColAt
}{\param{int
}{colPos
}}
649 Returns the column ID of the specified column position.
652 \membersection{wxGrid::GetColLeft
}\label{wxgridgetcolleft
}
654 \constfunc{int
}{GetColLeft
}{\param{int
}{col
}}
658 \membersection{wxGrid::GetColLabelAlignment
}\label{wxgridgetcollabelalignment
}
660 \constfunc{void
}{GetColLabelAlignment
}{\param{int*
}{horiz
},
\param{int*
}{vert
}}
662 Sets the arguments to the current column label alignment values.
664 Horizontal alignment will be one of wxALIGN
\_LEFT, wxALIGN
\_CENTRE or wxALIGN
\_RIGHT.\\
665 Vertical alignment will be one of wxALIGN
\_TOP, wxALIGN
\_CENTRE or wxALIGN
\_BOTTOM.
667 \perlnote{This method takes no parameters and
668 returns a
2-element list
{\tt ( horiz, vert )
}.
}
672 \membersection{wxGrid::GetColLabelSize
}\label{wxgridgetcollabelsize
}
674 \constfunc{int
}{GetColLabelSize
}{\void}
676 Returns the current height of the column labels.
680 \membersection{wxGrid::GetColLabelValue
}\label{wxgridgetcollabelvalue
}
682 \constfunc{wxString
}{GetColLabelValue
}{\param{int
}{col
}}
684 Returns the specified column label. The default grid table class provides column labels of
685 the form A,B...Z,AA,AB...ZZ,AAA... If you are using a custom grid table you can override
686 \helpref{wxGridTableBase::GetColLabelValue
}{wxgridtablebasegetcollabelvalue
} to provide
691 \membersection{wxGrid::GetColMinimalAcceptableWidth
}\label{wxgridgetcolminimalacceptablewidth
}
693 \constfunc{int
}{GetColMinimalAcceptableWidth
}{}
695 This returns the value of the lowest column width that can be handled correctly. See
696 member
\helpref{SetColMinimalAcceptableWidth
}{wxgridsetcolminimalacceptablewidth
} for details.
700 \membersection{wxGrid::GetColMinimalWidth
}\label{wxgridgetcolminimalwidth
}
702 \constfunc{int
}{GetColMinimalWidth
}{\param{int
}{col
}}
704 Get the minimal width of the given column/row.
708 \membersection{wxGrid::GetColPos
}\label{wxgridgetcolpos
}
710 \constfunc{int
}{GetColPos
}{\param{int
}{colID
}}
712 Returns the position of the specified column.
716 \membersection{wxGrid::GetColRight
}\label{wxgridgetcolright
}
718 \constfunc{int
}{GetColRight
}{\param{int
}{col
}}
722 \membersection{wxGrid::GetColSize
}\label{wxgridgetcolsize
}
724 \constfunc{int
}{GetColSize
}{\param{int
}{col
}}
726 Returns the width of the specified column.
730 \membersection{wxGrid::GetDefaultCellAlignment
}\label{wxgridgetdefaultcellalignment
}
732 \constfunc{void
}{GetDefaultCellAlignment
}{\param{int*
}{horiz
},
\param{int*
}{vert
}}
734 Sets the arguments to the current default horizontal and vertical text alignment
737 Horizontal alignment will be one of wxALIGN
\_LEFT, wxALIGN
\_CENTRE or wxALIGN
\_RIGHT. \\
738 Vertical alignment will be one of wxALIGN
\_TOP, wxALIGN
\_CENTRE or wxALIGN
\_BOTTOM.
742 \membersection{wxGrid::GetDefaultCellBackgroundColour
}\label{wxgridgetdefaultcellbackgroundcolour
}
744 \constfunc{wxColour
}{GetDefaultCellBackgroundColour
}{\void}
746 Returns the current default background colour for grid cells.
750 \membersection{wxGrid::GetDefaultCellFont
}\label{wxgridgetdefaultcellfont
}
752 \constfunc{wxFont
}{GetDefaultCellFont
}{\void}
754 Returns the current default font for grid cell text.
758 \membersection{wxGrid::GetDefaultCellTextColour
}\label{wxgridgetdefaultcelltextcolour
}
760 \constfunc{wxColour
}{GetDefaultCellTextColour
}{\void}
762 Returns the current default colour for grid cell text.
766 \membersection{wxGrid::GetDefaultColLabelSize
}\label{wxgridgetdefaultcollabelsize
}
768 \constfunc{int
}{GetDefaultColLabelSize
}{\void}
770 Returns the default height for column labels.
774 \membersection{wxGrid::GetDefaultColSize
}\label{wxgridgetdefaultcolsize
}
776 \constfunc{int
}{GetDefaultColSize
}{\void}
778 Returns the current default width for grid columns.
782 \membersection{wxGrid::GetDefaultEditor
}\label{wxgridgetdefaulteditor
}
784 \constfunc{wxGridCellEditor*
}{GetDefaultEditor
}{\void}
786 Returns a pointer to the current default grid cell editor.
788 See
\helpref{wxGridCellEditor
}{wxgridcelleditor
} and
789 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
793 \membersection{wxGrid::GetDefaultEditorForCell
}\label{wxgridgetdefaulteditorforcell
}
795 \constfunc{wxGridCellEditor*
}{GetDefaultEditorForCell
}{\param{int
}{row
},
\param{int
}{col
}}
797 \constfunc{wxGridCellEditor*
}{GetDefaultEditorForCell
}{\param{const wxGridCellCoords\&
}{c
}}
801 \membersection{wxGrid::GetDefaultEditorForType
}\label{wxgridgetdefaulteditorfortype
}
803 \constfunc{wxGridCellEditor*
}{GetDefaultEditorForType
}{\param{const wxString\&
}{typeName
}}
807 \membersection{wxGrid::GetDefaultRenderer
}\label{wxgridgetdefaultrenderer
}
809 \constfunc{wxGridCellRenderer*
}{GetDefaultRenderer
}{\void}
811 Returns a pointer to the current default grid cell renderer.
813 See
\helpref{wxGridCellRenderer
}{wxgridcellrenderer
} and
814 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
818 \membersection{wxGrid::GetDefaultRendererForCell
}\label{wxgridgetdefaultrendererforcell
}
820 \constfunc{wxGridCellRenderer*
}{GetDefaultRendererForCell
}{\param{int
}{row
},
\param{int
}{col
}}
824 \membersection{wxGrid::GetDefaultRendererForType
}\label{wxgridgetdefaultrendererfortype
}
826 \constfunc{wxGridCellRenderer*
}{GetDefaultRendererForType
}{\param{const wxString\&
}{typeName
}}
830 \membersection{wxGrid::GetDefaultRowLabelSize
}\label{wxgridgetdefaultrowlabelsize
}
832 \constfunc{int
}{GetDefaultRowLabelSize
}{\void}
834 Returns the default width for the row labels.
838 \membersection{wxGrid::GetDefaultRowSize
}\label{wxgridgetdefaultrowsize
}
840 \constfunc{int
}{GetDefaultRowSize
}{\void}
842 Returns the current default height for grid rows.
846 \membersection{wxGrid::GetGridCursorCol
}\label{wxgridgetgridcursorcol
}
848 \constfunc{int
}{GetGridCursorCol
}{\void}
850 Returns the current grid cell column position.
854 \membersection{wxGrid::GetGridCursorRow
}\label{wxgridgetgridcursorrow
}
856 \constfunc{int
}{GetGridCursorRow
}{\void}
858 Returns the current grid cell row position.
862 \membersection{wxGrid::GetGridLineColour
}\label{wxgridgetgridlinecolour
}
864 \constfunc{wxColour
}{GetGridLineColour
}{\void}
866 Returns the colour used for grid lines.
870 \helpref{GetDefaultGridLinePen()
}{wxgridgetdefaultgridlinepen
}
873 \membersection{wxGrid::GetDefaultGridLinePen
}\label{wxgridgetdefaultgridlinepen
}
875 \func{wxPen
}{GetDefaultGridLinePen
}{\void}
877 Returns the pen used for grid lines. This virtual function may be overridden in
878 derived classes in order to change the appearance of grid lines. Note that
879 currently the pen width must be $
1$.
883 \helpref{GetColGridLinePen()
}{wxgridgetcolgridlinepen
},\\
884 \helpref{GetRowGridLinePen()
}{wxgridgetrowgridlinepen
}
889 \membersection{wxGrid::GetRowGridLinePen
}\label{wxgridgetrowgridlinepen
}
891 \func{wxPen
}{GetRowGridLinePen
}{\param{int
}{row
}}
893 Returns the pen used for horizontal grid lines. This virtual function may be
894 overridden in derived classes in order to change the appearance of individual
895 grid line for the given row
\arg{row
}.
900 // in a grid displaying music notation, use a solid black pen between
901 // octaves (C0=row
127, C1=row
115 etc.)
902 wxPen MidiGrid::GetRowGridLinePen(int row)
905 return wxPen
(*wxBLACK, 1, wxSOLID);
907 return GetDefaultGridLinePen();
913 \membersection{wxGrid::GetColGridLinePen}\label{wxgridgetcolgridlinepen}
915 \func{wxPen}{GetColGridLinePen}{\param{int }{col}}
917 Returns the pen used for vertical grid lines. This virtual function may be
918 overridden in derived classes in order to change the appearance of individual
919 grid lines for the given column \arg{col}.
921 See \helpref{GetRowGridLinePen()}{wxgridgetrowgridlinepen} for an example.
926 \membersection{wxGrid::GridLinesEnabled}\label{wxgridgridlinesenabled}
928 \constfunc{bool}{GridLinesEnabled}{\void}
930 Returns true if drawing of grid lines is turned on, false otherwise.
934 \membersection{wxGrid::GetLabelBackgroundColour}\label{wxgridgetlabelbackgroundcolour}
936 \constfunc{wxColour}{GetLabelBackgroundColour}{\void}
938 Returns the colour used for the background of row and column labels.
942 \membersection{wxGrid::GetLabelFont}\label{wxgridgetlabelfont}
944 \constfunc{wxFont}{GetLabelFont}{\void}
946 Returns the font used for row and column labels.
950 \membersection{wxGrid::GetLabelTextColour}\label{wxgridgetlabeltextcolour}
952 \constfunc{wxColour}{GetLabelTextColour}{\void}
954 Returns the colour used for row and column label text.
958 \membersection{wxGrid::GetNumberCols}\label{wxgridgetnumbercols}
960 \constfunc{int}{GetNumberCols}{\void}
962 Returns the total number of grid columns (actually the number of columns in the underlying grid
967 \membersection{wxGrid::GetNumberRows}\label{wxgridgetnumberrows}
969 \constfunc{int}{GetNumberRows}{\void}
971 Returns the total number of grid rows (actually the number of rows in the underlying grid table).
975 \membersection{wxGrid::GetOrCreateCellAttr}\label{wxgridgetorcreatecellattr}
977 \constfunc{wxGridCellAttr*}{GetOrCreateCellAttr}{\param{int }{row}, \param{int }{col}}
981 \membersection{wxGrid::GetRowMinimalAcceptableHeight}\label{wxgridgetrowminimalacceptableheight}
983 \constfunc{int}{GetRowMinimalAcceptableHeight}{}
985 This returns the value of the lowest row width that can be handled correctly. See
986 member \helpref{SetRowMinimalAcceptableHeight}{wxgridsetrowminimalacceptableheight} for details.
990 \membersection{wxGrid::GetRowMinimalHeight}\label{wxgridgetrowminimalheight}
992 \constfunc{int}{GetRowMinimalHeight}{\param{int }{col}}
996 \membersection{wxGrid::GetRowLabelAlignment}\label{wxgridgetrowlabelalignment}
998 \constfunc{void}{GetRowLabelAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
1000 Sets the arguments to the current row label alignment values.
1002 Horizontal alignment will be one of wxLEFT, wxCENTRE or wxRIGHT. \\
1003 Vertical alignment will be one of wxTOP, wxCENTRE or wxBOTTOM.
1005 \perlnote{This method takes no parameters and
1006 returns a 2-element list {\tt ( horiz, vert )}.}
1010 \membersection{wxGrid::GetRowLabelSize}\label{wxgridgetrowlabelsize}
1012 \constfunc{int}{GetRowLabelSize}{\void}
1014 Returns the current width of the row labels.
1018 \membersection{wxGrid::GetRowLabelValue}\label{wxgridgetrowlabelvalue}
1020 \constfunc{wxString}{GetRowLabelValue}{\param{int }{row}}
1022 Returns the specified row label. The default grid table class provides numeric row labels.
1023 If you are using a custom grid table you can override
1024 \helpref{wxGridTableBase::GetRowLabelValue}{wxgridtablebasegetcollabelvalue} to provide
1029 \membersection{wxGrid::GetRowSize}\label{wxgridgetrowsize}
1031 \constfunc{int}{GetRowSize}{\param{int }{row}}
1033 Returns the height of the specified row.
1037 \membersection{wxGrid::GetScrollLineX}\label{wxgridgetscrolllinex}
1039 \constfunc{int}{GetScrollLineX}{\void}
1041 Returns the number of pixels per horizontal scroll increment. The default is 15.
1043 \wxheading{See also}
1045 \helpref{wxGrid::GetScrollLineY}{wxgridgetscrollliney},\rtfsp
1046 \helpref{wxGrid::SetScrollLineX}{wxgridsetscrolllinex},\rtfsp
1047 \helpref{wxGrid::SetScrollLineY}{wxgridsetscrollliney}
1051 \membersection{wxGrid::GetScrollLineY}\label{wxgridgetscrollliney}
1053 \constfunc{int}{GetScrollLineY}{\void}
1055 Returns the number of pixels per vertical scroll increment. The default is 15.
1057 \wxheading{See also}
1059 \helpref{wxGrid::GetScrollLineX}{wxgridgetscrolllinex},\rtfsp
1060 \helpref{wxGrid::SetScrollLineX}{wxgridsetscrolllinex},\rtfsp
1061 \helpref{wxGrid::SetScrollLineY}{wxgridsetscrollliney}
1065 \membersection{wxGrid::GetSelectionMode}\label{wxgridgetselectionmode}
1067 \constfunc{wxGrid::wxGridSelectionModes}{GetSelectionMode}{\void}
1069 Returns the current selection mode, see \helpref{wxGrid::SetSelectionMode}{wxgridsetselectionmode}.
1073 \membersection{wxGrid::GetSelectedCells}\label{wxgridgetselectedcells}
1075 \constfunc{wxGridCellCoordsArray}{GetSelectedCells}{\void}
1077 Returns an array of singly selected cells.
1081 \membersection{wxGrid::GetSelectedCols}\label{wxgridgetselectedcols}
1083 \constfunc{wxArrayInt}{GetSelectedCols}{\void}
1085 Returns an array of selected cols.
1089 \membersection{wxGrid::GetSelectedRows}\label{wxgridgetselectedrows}
1091 \constfunc{wxArrayInt}{GetSelectedRows}{\void}
1093 Returns an array of selected rows.
1097 \membersection{wxGrid::GetSelectionBackground}\label{wxgridgetselectionbackground}
1099 \constfunc{wxColour}{GetSelectionBackground}{\void}
1101 Access or update the selection fore/back colours
1105 \membersection{wxGrid::GetSelectionBlockTopLeft}\label{wxgridgetselectionblocktopleft}
1107 \constfunc{wxGridCellCoordsArray}{GetSelectionBlockTopLeft}{\void}
1109 Returns an array of the top left corners of blocks of selected cells,
1110 see \helpref{wxGrid::GetSelectionBlockBottomRight}{wxgridgetselectionblockbottomright}.
1114 \membersection{wxGrid::GetSelectionBlockBottomRight}\label{wxgridgetselectionblockbottomright}
1116 \constfunc{wxGridCellCoordsArray}{GetSelectionBlockBottomRight}{\void}
1118 Returns an array of the bottom right corners of blocks of selected cells,
1119 see \helpref{wxGrid::GetSelectionBlockTopLeft}{wxgridgetselectionblocktopleft}.
1123 \membersection{wxGrid::GetSelectionForeground}\label{wxgridgetselectionforeground}
1125 \constfunc{wxColour}{GetSelectionForeground}{\void}
1129 \membersection{wxGrid::GetTable}\label{wxgridgettable}
1131 \constfunc{wxGridTableBase *}{GetTable}{\void}
1133 Returns a base pointer to the current table object.
1137 \membersection{wxGrid::GetViewWidth}\label{wxgridgetviewwidth}
1139 \constfunc{int}{GetViewWidth}{\void}
1141 Returned number of whole cols visible.
1145 \membersection{wxGrid::HideCellEditControl}\label{wxgridhidecelleditcontrol}
1147 \func{void}{HideCellEditControl}{\void}
1149 Hides the in-place cell edit control.
1153 \membersection{wxGrid::InitColWidths}\label{wxgridinitcolwidths}
1155 \func{void}{InitColWidths}{\void}
1157 Init the m\_colWidths/Rights arrays
1161 \membersection{wxGrid::InitRowHeights}\label{wxgridinitrowheights}
1163 \func{void}{InitRowHeights}{\void}
1165 NB: {\it never} access m\_row/col arrays directly because they are created
1166 on demand, {\it always} use accessor functions instead!
1168 Init the m\_rowHeights/Bottoms arrays with default values.
1172 \membersection{wxGrid::InsertCols}\label{wxgridinsertcols}
1174 \func{bool}{InsertCols}{\param{int }{pos = 0}, \param{int }{numCols = 1}, \param{bool }{updateLabels = true}}
1176 Inserts one or more new columns into a grid with the first new column at the
1177 specified position and returns true if successful. The updateLabels argument is not
1180 The sequence of actions begins with the grid object requesting the underlying grid
1181 table to insert new columns. If this is successful the table notifies the grid and the
1182 grid updates the display. For a default grid (one where you have called
1183 \helpref{wxGrid::CreateGrid}{wxgridcreategrid}) this process is automatic. If you are
1184 using a custom grid table (specified with \helpref{wxGrid::SetTable}{wxgridsettable})
1185 then you must override
1186 \helpref{wxGridTableBase::InsertCols}{wxgridtablebaseinsertcols} in your derived
1191 \membersection{wxGrid::InsertRows}\label{wxgridinsertrows}
1193 \func{bool}{InsertRows}{\param{int }{pos = 0}, \param{int }{numRows = 1}, \param{bool }{updateLabels = true}}
1195 Inserts one or more new rows into a grid with the first new row at the specified
1196 position and returns true if successful. The updateLabels argument is not used at
1199 The sequence of actions begins with the grid object requesting the underlying grid
1200 table to insert new rows. If this is successful the table notifies the grid and the
1201 grid updates the display. For a default grid (one where you have called
1202 \helpref{wxGrid::CreateGrid}{wxgridcreategrid}) this process is automatic. If you are
1203 using a custom grid table (specified with \helpref{wxGrid::SetTable}{wxgridsettable})
1204 then you must override
1205 \helpref{wxGridTableBase::InsertRows}{wxgridtablebaseinsertrows} in your derived
1210 \membersection{wxGrid::IsCellEditControlEnabled}\label{wxgridiscelleditcontrolenabled}
1212 \constfunc{bool}{IsCellEditControlEnabled}{\void}
1214 Returns true if the in-place edit control is currently enabled.
1218 \membersection{wxGrid::IsCurrentCellReadOnly}\label{wxgridiscurrentcellreadonly}
1220 \constfunc{bool}{IsCurrentCellReadOnly}{\void}
1222 Returns true if the current cell has been set to read-only
1223 (see \helpref{wxGrid::SetReadOnly}{wxgridsetreadonly}).
1227 \membersection{wxGrid::IsEditable}\label{wxgridiseditable}
1229 \constfunc{bool}{IsEditable}{\void}
1231 Returns false if the whole grid has been set as read-only or true otherwise.
1232 See \helpref{wxGrid::EnableEditing}{wxgridenableediting} for more information about
1233 controlling the editing status of grid cells.
1237 \membersection{wxGrid::IsInSelection}\label{wxgridisinselection}
1239 \constfunc{bool}{IsInSelection}{\param{int }{row}, \param{int }{col}}
1241 \constfunc{bool}{IsInSelection}{\param{const wxGridCellCoords\& }{coords}}
1243 Is this cell currently selected.
1247 \membersection{wxGrid::IsReadOnly}\label{wxgridisreadonly}
1249 \constfunc{bool}{IsReadOnly}{\param{int }{row}, \param{int }{col}}
1251 Returns true if the cell at the specified location can't be edited.
1252 See also \helpref{wxGrid::IsReadOnly}{wxgridisreadonly}.
1256 \membersection{wxGrid::IsSelection}\label{wxgridisselection}
1258 \constfunc{bool}{IsSelection}{\void}
1260 Returns true if there are currently rows, columns or blocks of cells selected.
1264 \membersection{wxGrid::IsVisible}\label{wxgridisvisible}
1266 \constfunc{bool}{IsVisible}{\param{int }{row}, \param{int }{col}, \param{bool }{wholeCellVisible = true}}
1268 \constfunc{bool}{IsVisible}{\param{const wxGridCellCoords\& }{coords}, \param{bool }{wholeCellVisible = true}}
1270 Returns true if a cell is either wholly visible (the default) or at least partially
1271 visible in the grid window.
1275 \membersection{wxGrid::MakeCellVisible}\label{wxgridmakecellvisible}
1277 \func{void}{MakeCellVisible}{\param{int }{row}, \param{int }{col}}
1279 \func{void}{MakeCellVisible}{\param{const wxGridCellCoords\& }{coords}}
1281 Brings the specified cell into the visible grid cell area with minimal scrolling. Does
1282 nothing if the cell is already visible.
1286 \membersection{wxGrid::MoveCursorDown}\label{wxgridmovecursordown}
1288 \func{bool}{MoveCursorDown}{\param{bool }{expandSelection}}
1290 Moves the grid cursor down by one row. If a block of cells was previously selected it
1291 will expand if the argument is true or be cleared if the argument is false.
1293 \wxheading{Keyboard}\\
1294 This function is called for Down cursor key presses or Shift+Down to expand a selection.
1298 \membersection{wxGrid::MoveCursorLeft}\label{wxgridmovecursorleft}
1300 \func{bool}{MoveCursorLeft}{\param{bool }{expandSelection}}
1302 Moves the grid cursor left by one column. If a block of cells was previously selected it
1303 will expand if the argument is true or be cleared if the argument is false.
1305 \wxheading{Keyboard}\\
1306 This function is called for Left cursor key presses or Shift+Left to expand a selection.
1310 \membersection{wxGrid::MoveCursorRight}\label{wxgridmovecursorright}
1312 \func{bool}{MoveCursorRight}{\param{bool }{expandSelection}}
1314 Moves the grid cursor right by one column. If a block of cells was previously selected it
1315 will expand if the argument is true or be cleared if the argument is false.
1317 \wxheading{Keyboard}\\
1318 This function is called for Right cursor key presses or Shift+Right to expand a selection.
1322 \membersection{wxGrid::MoveCursorUp}\label{wxgridmovecursorup}
1324 \func{bool}{MoveCursorUp}{\param{bool }{expandSelection}}
1326 Moves the grid cursor up by one row. If a block of cells was previously selected it
1327 will expand if the argument is true or be cleared if the argument is false.
1329 \wxheading{Keyboard}\\
1330 This function is called for Up cursor key presses or Shift+Up to expand a selection.
1334 \membersection{wxGrid::MoveCursorDownBlock}\label{wxgridmovecursordownblock}
1336 \func{bool}{MoveCursorDownBlock}{\param{bool }{expandSelection}}
1338 Moves the grid cursor down in the current column such that it skips to the beginning or
1339 end of a block of non-empty cells. If a block of cells was previously selected it
1340 will expand if the argument is true or be cleared if the argument is false.
1342 \wxheading{Keyboard}\\
1343 This function is called for the Ctrl+Down key combination. Shift+Ctrl+Down expands a selection.
1347 \membersection{wxGrid::MoveCursorLeftBlock}\label{wxgridmovecursorleftblock}
1349 \func{bool}{MoveCursorLeftBlock}{\param{bool }{expandSelection}}
1351 Moves the grid cursor left in the current row such that it skips to the beginning or
1352 end of a block of non-empty cells. If a block of cells was previously selected it
1353 will expand if the argument is true or be cleared if the argument is false.
1355 \wxheading{Keyboard}\\
1356 This function is called for the Ctrl+Left key combination. Shift+Ctrl+left expands a selection.
1360 \membersection{wxGrid::MoveCursorRightBlock}\label{wxgridmovecursorrightblock}
1362 \func{bool}{MoveCursorRightBlock}{\param{bool }{expandSelection}}
1364 Moves the grid cursor right in the current row such that it skips to the beginning or
1365 end of a block of non-empty cells. If a block of cells was previously selected it
1366 will expand if the argument is true or be cleared if the argument is false.
1368 \wxheading{Keyboard}\\
1369 This function is called for the Ctrl+Right key combination. Shift+Ctrl+Right expands a selection.
1373 \membersection{wxGrid::MoveCursorUpBlock}\label{wxgridmovecursorupblock}
1375 \func{bool}{MoveCursorUpBlock}{\param{bool }{expandSelection}}
1377 Moves the grid cursor up in the current column such that it skips to the beginning or
1378 end of a block of non-empty cells. If a block of cells was previously selected it
1379 will expand if the argument is true or be cleared if the argument is false.
1381 \wxheading{Keyboard}\\
1382 This function is called for the Ctrl+Up key combination. Shift+Ctrl+Up expands a selection.
1386 \membersection{wxGrid::MovePageDown}\label{wxgridmovepagedown}
1388 \func{bool}{MovePageDown}{\void}
1390 Moves the grid cursor down by some number of rows so that the previous bottom visible row
1391 becomes the top visible row.
1393 \wxheading{Keyboard}\\
1394 This function is called for PgDn keypresses.
1398 \membersection{wxGrid::MovePageUp}\label{wxgridmovepageup}
1400 \func{bool}{MovePageUp}{\void}
1402 Moves the grid cursor up by some number of rows so that the previous top visible row
1403 becomes the bottom visible row.
1405 \wxheading{Keyboard}\\
1406 This function is called for PgUp keypresses.
1410 \membersection{wxGrid::RegisterDataType}\label{wxgridregisterdatatype}
1412 \func{void}{RegisterDataType}{\param{const wxString\& }{typeName}, \param{wxGridCellRenderer* }{renderer}, \param{wxGridCellEditor* }{editor}}
1414 Methods for a registry for mapping data types to Renderers/Editors
1418 \membersection{wxGrid::SaveEditControlValue}\label{wxgridsaveeditcontrolvalue}
1420 \func{void}{SaveEditControlValue}{\void}
1422 Sets the value of the current grid cell to the current in-place edit control value.
1423 This is called automatically when the grid cursor moves from the current cell to a
1424 new cell. It is also a good idea to call this function when closing a grid since
1425 any edits to the final cell location will not be saved otherwise.
1429 \membersection{wxGrid::SelectAll}\label{wxgridselectall}
1431 \func{void}{SelectAll}{\void}
1433 Selects all cells in the grid.
1437 \membersection{wxGrid::SelectBlock}\label{wxgridselectblock}
1439 \func{void}{SelectBlock}{\param{int }{topRow}, \param{int }{leftCol},
1440 \param{int }{bottomRow}, \param{int }{rightCol}, \param{bool }{addToSelected = false}}
1442 \func{void}{SelectBlock}{\param{const wxGridCellCoords\& }{topLeft},
1443 \param{const wxGridCellCoords\& }{bottomRight}, \param{bool }{addToSelected = false}}
1445 Selects a rectangular block of cells. If addToSelected is false then any existing selection will be
1446 deselected; if true the column will be added to the existing selection.
1450 \membersection{wxGrid::SelectCol}\label{wxgridselectcol}
1452 \func{void}{SelectCol}{\param{int }{col}, \param{bool }{addToSelected = false}}
1454 Selects the specified column. If addToSelected is false then any existing selection will be
1455 deselected; if true the column will be added to the existing selection.
1459 \membersection{wxGrid::SelectionToDeviceRect}\label{wxgridselectiontodevicerect}
1461 \constfunc{wxRect}{SelectionToDeviceRect}{\void}
1463 This function returns the rectangle that encloses the selected cells
1464 in device coords and clipped to the client size of the grid window.
1468 \membersection{wxGrid::SelectRow}\label{wxgridselectrow}
1470 \func{void}{SelectRow}{\param{int }{row}, \param{bool }{addToSelected = false}}
1472 Selects the specified row. If addToSelected is false then any existing selection will be
1473 deselected; if true the row will be added to the existing selection.
1477 \membersection{wxGrid::SetCellAlignment}\label{wxgridsetcellalignment}
1479 \func{void}{SetCellAlignment}{\param{int }{row}, \param{int }{col}, \param{int }{horiz}, \param{int }{vert}}
1481 \func{void}{SetCellAlignment}{\param{int }{align}, \param{int }{row}, \param{int }{col}}
1483 Sets the horizontal and vertical alignment for grid cell text at the specified location.
1485 Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT. \\
1486 Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM.
1490 \membersection{wxGrid::SetCellBackgroundColour}\label{wxgridsetcellbackgroundcolour}
1492 \func{void}{SetCellBackgroundColour}{\param{int }{row}, \param{int }{col}, \param{const wxColour\&}{ colour}}
1496 \membersection{wxGrid::SetCellEditor}\label{wxgridsetcelleditor}
1498 \func{void}{SetCellEditor}{\param{int }{row}, \param{int }{col}, \param{wxGridCellEditor* }{editor}}
1500 Sets the editor for the grid cell at the specified location.
1501 The grid will take ownership of the pointer.
1503 See \helpref{wxGridCellEditor}{wxgridcelleditor} and
1504 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
1508 \membersection{wxGrid::SetCellFont}\label{wxgridsetcellfont}
1510 \func{void}{SetCellFont}{\param{int }{row}, \param{int }{col}, \param{const wxFont\&}{ font}}
1512 Sets the font for text in the grid cell at the specified location.
1516 \membersection{wxGrid::SetCellRenderer}\label{wxgridsetcellrenderer}
1518 \func{void}{SetCellRenderer}{\param{int }{row}, \param{int }{col}, \param{wxGridCellRenderer* }{renderer}}
1520 Sets the renderer for the grid cell at the specified location.
1521 The grid will take ownership of the pointer.
1523 See \helpref{wxGridCellRenderer}{wxgridcellrenderer} and
1524 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
1528 \membersection{wxGrid::SetCellTextColour}\label{wxgridsetcelltextcolour}
1530 \func{void}{SetCellTextColour}{\param{int }{row}, \param{int }{col}, \param{const wxColour\&}{ colour}}
1532 \func{void}{SetCellTextColour}{\param{const wxColour\& }{val}, \param{int }{row}, \param{int }{col}}
1534 \func{void}{SetCellTextColour}{\param{const wxColour\& }{colour}}
1536 Sets the text colour for the grid cell at the specified location.
1540 \membersection{wxGrid::SetCellValue}\label{wxgridsetcellvalue}
1542 \func{void}{SetCellValue}{\param{int }{row}, \param{int }{col}, \param{const wxString\& }{s}}
1544 \func{void}{SetCellValue}{\param{const wxGridCellCoords\& }{coords}, \param{const wxString\& }{s}}
1546 \func{void}{SetCellValue}{\param{const wxString\& }{val}, \param{int }{row}, \param{int }{col}}
1548 Sets the string value for the cell at the specified location. For simple applications where a
1549 grid object automatically uses a default grid table of string values you use this function together
1550 with \helpref{wxGrid::GetCellValue}{wxgridgetcellvalue} to access cell values.
1552 For more complex applications where you have derived your own grid table class that contains
1553 various data types (e.g. numeric, boolean or user-defined custom types) then you only use this
1554 function for those cells that contain string values.
1556 The last form is for backward compatibility only.
1558 See \helpref{wxGridTableBase::CanSetValueAs}{wxgridtablebasecangetvalueas}
1559 and the \helpref{wxGrid overview}{gridoverview} for more information.
1563 \membersection{wxGrid::SetColAttr}\label{wxgridsetcolattr}
1565 \func{void}{SetColAttr}{\param{int }{col}, \param{wxGridCellAttr* }{attr}}
1567 Sets the cell attributes for all cells in the specified column.
1569 For more information about controlling grid cell attributes see the
1570 \helpref{wxGridCellAttr}{wxgridcellattr} cell attribute class and the
1571 \helpref{wxGrid classes overview}{gridoverview}.
1575 \membersection{wxGrid::SetColFormatBool}\label{wxgridsetcolformatbool}
1577 \func{void}{SetColFormatBool}{\param{int }{col}}
1579 Sets the specified column to display boolean values. wxGrid displays boolean values with a checkbox.
1583 \membersection{wxGrid::SetColFormatNumber}\label{wxgridsetcolformatnumber}
1585 \func{void}{SetColFormatNumber}{\param{int }{col}}
1587 Sets the specified column to display integer values.
1591 \membersection{wxGrid::SetColFormatFloat}\label{wxgridsetcolformatfloat}
1593 \func{void}{SetColFormatFloat}{\param{int }{col}, \param{int }{width = -1}, \param{int }{precision = -1}}
1595 Sets the specified column to display floating point values with the given width and precision.
1599 \membersection{wxGrid::SetColFormatCustom}\label{wxgridsetcolformatcustom}
1601 \func{void}{SetColFormatCustom}{\param{int }{col}, \param{const wxString\& }{typeName}}
1603 Sets the specified column to display data in a custom format.
1604 See the \helpref{wxGrid overview}{gridoverview} for more information on working
1605 with custom data types.
1609 \membersection{wxGrid::SetColLabelAlignment}\label{wxgridsetcollabelalignment}
1611 \func{void}{SetColLabelAlignment}{\param{int }{horiz}, \param{int }{vert}}
1613 Sets the horizontal and vertical alignment of column label text.
1615 Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT.
1617 Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM.
1621 \membersection{wxGrid::SetColLabelSize}\label{wxgridsetcollabelsize}
1623 \func{void}{SetColLabelSize}{\param{int }{height}}
1625 Sets the height of the column labels.
1627 If \arg{height} equals to \texttt{wxGRID\_AUTOSIZE} then height is calculated automatically
1628 so that no label is truncated. Note that this could be slow for a large table.
1632 \membersection{wxGrid::SetColLabelValue}\label{wxgridsetcollabelvalue}
1634 \func{void}{SetColLabelValue}{\param{int }{col}, \param{const wxString\&}{ value}}
1636 Set the value for the given column label. If you are using a derived grid table you must
1637 override \helpref{wxGridTableBase::SetColLabelValue}{wxgridtablebasesetcollabelvalue}
1638 for this to have any effect.
1642 \membersection{wxGrid::SetColMinimalWidth}\label{wxgridsetcolminimalwidth}
1644 \func{void}{SetColMinimalWidth}{\param{int }{col}, \param{int }{width}}
1646 Sets the minimal width for the specified column. This should normally be called when creating the grid
1647 because it will not resize a column that is already narrower than the minimal width.
1648 The width argument must be higher than the minimimal acceptable column width, see
1649 \helpref{wxGrid::GetColMinimalAcceptableWidth}{wxgridgetcolminimalacceptablewidth}.
1653 \membersection{wxGrid::SetColMinimalAcceptableWidth}\label{wxgridsetcolminimalacceptablewidth}
1655 \func{void}{SetColMinimalAcceptableWidth}{\param{int }{width}}
1657 This modifies the minimum column width that can be handled correctly. Specifying a low value here
1658 allows smaller grid cells to be dealt with correctly. Specifying a value here which is much smaller
1659 than the actual minimum size will incur a performance penalty in the functions which perform
1660 grid cell index lookup on the basis of screen coordinates.
1661 This should normally be called when creating the grid because it will not resize existing columns
1662 with sizes smaller than the value specified here.
1666 \membersection{wxGrid::SetColPos}\label{wxgridsetcolpos}
1668 \func{void}{SetColPos}{\param{int }{colID}, \param{int }{newPos}}
1670 Sets the position of the specified column.
1674 \membersection{wxGrid::SetColSize}\label{wxgridsetcolsize}
1676 \func{void}{SetColSize}{\param{int }{col}, \param{int }{width}}
1678 Sets the width of the specified column.
1680 This function does not refresh the grid. If you are calling it outside of a BeginBatch / EndBatch
1681 block you can use \helpref{wxGrid::ForceRefresh}{wxgridforcerefresh} to see the changes.
1683 Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will
1684 also be set as the minimal width for the column.
1687 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
1688 The memory requirements for this could become prohibitive if your grid is very large.
1692 \membersection{wxGrid::SetDefaultCellAlignment}\label{wxgridsetdefaultcellalignment}
1694 \func{void}{SetDefaultCellAlignment}{\param{int }{horiz}, \param{int }{vert}}
1696 Sets the default horizontal and vertical alignment for grid cell text.
1698 Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT.
1700 Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM.
1704 \membersection{wxGrid::SetDefaultCellBackgroundColour}\label{wxgridsetdefaultcellbackgroundcolour}
1706 \func{void}{SetDefaultCellBackgroundColour}{\param{const wxColour\&}{ colour}}
1708 Sets the default background colour for grid cells.
1712 \membersection{wxGrid::SetDefaultCellFont}\label{wxgridsetdefaultcellfont}
1714 \func{void}{SetDefaultCellFont}{\param{const wxFont\&}{ font}}
1716 Sets the default font to be used for grid cell text.
1720 \membersection{wxGrid::SetDefaultCellTextColour}\label{wxgridsetdefaultcelltextcolour}
1722 \func{void}{SetDefaultCellTextColour}{\param{const wxColour\&}{ colour}}
1724 Sets the current default colour for grid cell text.
1728 \membersection{wxGrid::SetDefaultEditor}\label{wxgridsetdefaulteditor}
1730 \func{void}{SetDefaultEditor}{\param{wxGridCellEditor* }{editor}}
1732 Sets the default editor for grid cells. The grid will take ownership of the pointer.
1734 See \helpref{wxGridCellEditor}{wxgridcelleditor} and
1735 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
1739 \membersection{wxGrid::SetDefaultRenderer}\label{wxgridsetdefaultrenderer}
1741 \func{void}{SetDefaultRenderer}{\param{wxGridCellRenderer* }{renderer}}
1743 Sets the default renderer for grid cells. The grid will take ownership of the pointer.
1745 See \helpref{wxGridCellRenderer}{wxgridcellrenderer} and
1746 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
1750 \membersection{wxGrid::SetDefaultColSize}\label{wxgridsetdefaultcolsize}
1752 \func{void}{SetDefaultColSize}{\param{int }{width}, \param{bool }{resizeExistingCols = false}}
1754 Sets the default width for columns in the grid. This will only affect columns subsequently added to
1755 the grid unless resizeExistingCols is true.
1759 \membersection{wxGrid::SetDefaultRowSize}\label{wxgridsetdefaultrowsize}
1761 \func{void}{SetDefaultRowSize}{\param{int }{height}, \param{bool }{resizeExistingRows = false}}
1763 Sets the default height for rows in the grid. This will only affect rows subsequently added
1764 to the grid unless resizeExistingRows is true.
1768 \membersection{wxGrid::SetGridCursor}\label{wxgridsetgridcursor}
1770 \func{void}{SetGridCursor}{\param{int }{row}, \param{int }{col}}
1772 Set the grid cursor to the specified cell.
1773 This function calls \helpref{wxGrid::MakeCellVisible}{wxgridmakecellvisible}.
1777 \membersection{wxGrid::SetGridLineColour}\label{wxgridsetgridlinecolour}
1779 \func{void}{SetGridLineColour}{\param{const wxColour\&}{colour}}
1781 Sets the colour used to draw grid lines.
1785 \membersection{wxGrid::SetLabelBackgroundColour}\label{wxgridsetlabelbackgroundcolour}
1787 \func{void}{SetLabelBackgroundColour}{\param{const wxColour\&}{ colour}}
1789 Sets the background colour for row and column labels.
1793 \membersection{wxGrid::SetLabelFont}\label{wxgridsetlabelfont}
1795 \func{void}{SetLabelFont}{\param{const wxFont\&}{ font}}
1797 Sets the font for row and column labels.
1801 \membersection{wxGrid::SetLabelTextColour}\label{wxgridsetlabeltextcolour}
1803 \func{void}{SetLabelTextColour}{\param{const wxColour\&}{ colour}}
1805 Sets the colour for row and column label text.
1809 \membersection{wxGrid::SetMargins}\label{wxgridsetmargins}
1811 \func{void}{SetMargins}{\param{int }{extraWidth}, \param{int }{extraHeight}}
1813 A grid may occupy more space than needed for its rows/columns. This
1814 function allows to set how big this extra space is
1818 \membersection{wxGrid::SetOrCalcColumnSizes}\label{wxgridsetorcalccolumnsizes}
1820 \func{int}{SetOrCalcColumnSizes}{\param{bool }{calcOnly}, \param{bool }{setAsMin = true}}
1822 Common part of AutoSizeColumn/Row() and GetBestSize()
1826 \membersection{wxGrid::SetOrCalcRowSizes}\label{wxgridsetorcalcrowsizes}
1828 \func{int}{SetOrCalcRowSizes}{\param{bool }{calcOnly}, \param{bool }{setAsMin = true}}
1832 \membersection{wxGrid::SetReadOnly}\label{wxgridsetreadonly}
1834 \func{void}{SetReadOnly}{\param{int }{row}, \param{int }{col}, \param{bool }{isReadOnly = true}}
1836 Makes the cell at the specified location read-only or editable.
1837 See also \helpref{wxGrid::IsReadOnly}{wxgridisreadonly}.
1841 \membersection{wxGrid::SetRowAttr}\label{wxgridsetrowattr}
1843 \func{void}{SetRowAttr}{\param{int }{row}, \param{wxGridCellAttr* }{attr}}
1845 Sets the cell attributes for all cells in the specified row.
1846 See the \helpref{wxGridCellAttr}{wxgridcellattr} class for more information
1847 about controlling cell attributes.
1851 \membersection{wxGrid::SetRowLabelAlignment}\label{wxgridsetrowlabelalignment}
1853 \func{void}{SetRowLabelAlignment}{\param{int }{horiz}, \param{int }{vert}}
1855 Sets the horizontal and vertical alignment of row label text.
1857 Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT.
1859 Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM.
1863 \membersection{wxGrid::SetRowLabelSize}\label{wxgridsetrowlabelsize}
1865 \func{void}{SetRowLabelSize}{\param{int }{width}}
1867 Sets the width of the row labels.
1869 If \arg{width} equals \texttt{wxGRID\_AUTOSIZE} then width is calculated automatically
1870 so that no label is truncated. Note that this could be slow for a large table.
1874 \membersection{wxGrid::SetRowLabelValue}\label{wxgridsetrowlabelvalue}
1876 \func{void}{SetRowLabelValue}{\param{int }{row}, \param{const wxString\&}{ value}}
1878 Set the value for the given row label. If you are using a derived grid table you must
1879 override \helpref{wxGridTableBase::SetRowLabelValue}{wxgridtablebasesetrowlabelvalue}
1880 for this to have any effect.
1884 \membersection{wxGrid::SetRowMinimalHeight}\label{wxgridsetrowminimalheight}
1886 \func{void}{SetRowMinimalHeight}{\param{int }{row}, \param{int }{height}}
1888 Sets the minimal height for the specified row. This should normally be called when creating the grid
1889 because it will not resize a row that is already shorter than the minimal height.
1890 The height argument must be higher than the minimimal acceptable row height, see
1891 \helpref{wxGrid::GetRowMinimalAcceptableHeight}{wxgridgetrowminimalacceptableheight}.
1895 \membersection{wxGrid::SetRowMinimalAcceptableHeight}\label{wxgridsetrowminimalacceptableheight}
1897 \func{void}{SetRowMinimalAcceptableHeight}{\param{int }{height}}
1899 This modifies the minimum row width that can be handled correctly. Specifying a low value here
1900 allows smaller grid cells to be dealt with correctly. Specifying a value here which is much smaller
1901 than the actual minimum size will incur a performance penalty in the functions which perform
1902 grid cell index lookup on the basis of screen coordinates.
1903 This should normally be called when creating the grid because it will not resize existing rows
1904 with sizes smaller than the value specified here.
1908 \membersection{wxGrid::SetRowSize}\label{wxgridsetrowsize}
1910 \func{void}{SetRowSize}{\param{int }{row}, \param{int }{height}}
1912 Sets the height of the specified row.
1914 This function does not refresh the grid. If you are calling it outside of a BeginBatch / EndBatch
1915 block you can use \helpref{wxGrid::ForceRefresh}{wxgridforcerefresh} to see the changes.
1917 Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will
1918 also be set as the minimal width for the column.
1922 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
1923 The memory requirements for this could become prohibitive if your grid is very large.
1927 \membersection{wxGrid::SetScrollLineX}\label{wxgridsetscrolllinex}
1929 \func{void}{SetScrollLineX}{\param{int }{x}}
1931 Sets the number of pixels per horizontal scroll increment. The default is 15.
1932 Sometimes wxGrid has trouble setting the scrollbars correctly due to rounding
1933 errors: setting this to 1 can help.
1935 \wxheading{See also}
1937 \helpref{wxGrid::GetScrollLineX}{wxgridgetscrolllinex},\rtfsp
1938 \helpref{wxGrid::GetScrollLineY}{wxgridgetscrollliney},\rtfsp
1939 \helpref{wxGrid::SetScrollLineY}{wxgridsetscrollliney}
1943 \membersection{wxGrid::SetScrollLineY}\label{wxgridsetscrollliney}
1945 \func{void}{SetScrollLineY}{\param{int }{y}}
1947 Sets the number of pixels per vertical scroll increment. The default is 15.
1948 Sometimes wxGrid has trouble setting the scrollbars correctly due to rounding
1949 errors: setting this to 1 can help.
1951 \wxheading{See also}
1953 \helpref{wxGrid::GetScrollLineX}{wxgridgetscrolllinex},\rtfsp
1954 \helpref{wxGrid::GetScrollLineY}{wxgridgetscrollliney},\rtfsp
1955 \helpref{wxGrid::SetScrollLineX}{wxgridsetscrolllinex}
1959 \membersection{wxGrid::SetSelectionBackground}\label{wxgridsetselectionbackground}
1961 \func{void}{SetSelectionBackground}{\param{const wxColour\& }{c}}
1965 \membersection{wxGrid::SetSelectionForeground}\label{wxgridsetselectionforeground}
1967 \func{void}{SetSelectionForeground}{\param{const wxColour\& }{c}}
1971 \membersection{wxGrid::SetSelectionMode}\label{wxgridsetselectionmode}
1973 \func{void}{SetSelectionMode}{\param{wxGrid::wxGridSelectionModes}{ selmode}}
1975 Set the selection behaviour of the grid.
1977 \wxheading{Parameters}
1979 \docparam{wxGrid::wxGridSelectCells}{The default mode where individual cells are selected.}
1981 \docparam{wxGrid::wxGridSelectRows}{Selections will consist of whole rows.}
1983 \docparam{wxGrid::wxGridSelectColumns}{Selections will consist of whole columns.}
1987 \membersection{wxGrid::SetTable}\label{wxgridsettable}
1989 \func{bool}{SetTable}{\param{wxGridTableBase* }{table}, \param{bool }{takeOwnership = false}, \param{wxGrid::wxGridSelectionModes }{selmode = wxGrid::wxGridSelectCells}}
1991 Passes a pointer to a custom grid table to be used by the grid. This should be called
1992 after the grid constructor and before using the grid object. If takeOwnership is set to
1993 true then the table will be deleted by the wxGrid destructor.
1995 Use this function instead of \helpref{wxGrid::CreateGrid}{wxgridcreategrid} when your
1996 application involves complex or non-string data or data sets that are too large to fit
2001 \membersection{wxGrid::ShowCellEditControl}\label{wxgridshowcelleditcontrol}
2003 \func{void}{ShowCellEditControl}{\void}
2005 Displays the in-place cell edit control for the current cell.
2009 \membersection{wxGrid::XToCol}\label{wxgridxtocol}
2011 \constfunc{int}{XToCol}{\param{int }{x}, \param{bool }{clipToMinMax = false}}
2013 \wxheading{Parameters}
2014 \docparam{x}{The x position to evaluate.}
2015 \docparam{clipToMinMax}{If true, rather than returning wxNOT\_FOUND, it returns either the first or last column depending on whether x is too far to the left or right respectively.}
2017 \wxheading{Return value}
2018 The grid column that corresponds to the logical x coordinate. Returns
2019 {\tt wxNOT\_FOUND} if there is no column at the x position.
2023 \membersection{wxGrid::XToEdgeOfCol}\label{wxgridxtoedgeofcol}
2025 \constfunc{int}{XToEdgeOfCol}{\param{int }{x}}
2027 Returns the column whose right hand edge is close to the given logical x position.
2028 If no column edge is near to this position {\tt wxNOT\_FOUND} is returned.
2032 \membersection{wxGrid::YToEdgeOfRow}\label{wxgridytoedgeofrow}
2034 \constfunc{int}{YToEdgeOfRow}{\param{int }{y}}
2036 Returns the row whose bottom edge is close to the given logical y position.
2037 If no row edge is near to this position {\tt wxNOT\_FOUND} is returned.
2041 \membersection{wxGrid::YToRow}\label{wxgridytorow}
2043 \constfunc{int}{YToRow}{\param{int }{y}}
2045 Returns the grid row that corresponds to the logical y coordinate. Returns
2046 {\tt wxNOT\_FOUND} if there is no row at the y position.