]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/grid.tex
simple GetContext() and one other minor doc
[wxWidgets.git] / docs / latex / wx / grid.tex
1 \section{\class{wxGrid}}\label{wxgrid}
2
3 wxGrid and its related classes are used for displaying and editing tabular
4 data. They provide a rich set of features for display, editing, and
5 interacting with a variety of data sources. For simple applications, and to
6 help you get started, wxGrid is the only class you need to refer to
7 directly. It will set up default instances of the other classes and manage
8 them for you. For more complex applications you can derive your own
9 classes for custom grid views, grid data tables, cell editors and
10 renderers. The \helpref{wxGrid classes overview}{gridoverview} has
11 examples of simple and more complex applications, explains the
12 relationship between the various grid classes and has a summary of the
13 keyboard shortcuts and mouse functions provided by wxGrid.
14
15 wxGrid has been greatly expanded and redesigned for wxWidgets 2.2
16 onwards. If you have been using the old wxGrid class you will probably
17 want to have a look at the \helpref{wxGrid classes overview}{gridoverview} to see
18 how things have changed. The new grid classes are reasonably backward-compatible
19 but there are some exceptions. There are also easier ways of doing many things compared to
20 the previous implementation.
21
22 \wxheading{Derived from}
23
24 \helpref{wxScrolledWindow}{wxscrolledwindow}\\
25 \helpref{wxWindow}{wxwindow}\\
26 \helpref{wxEvtHandler}{wxevthandler}\\
27 \helpref{wxObject}{wxobject}
28
29 \wxheading{Include files}
30
31 <wx/grid.h>
32
33 \wxheading{Window styles}
34
35 There are presently no specific window styles for wxGrid.
36
37 \wxheading{Event handling}
38
39 \input gridevt.inc
40
41 The event handler for the following functions takes a
42 \helpref{wxGridSizeEvent}{wxgridsizeevent} parameter.
43 The ...\_CMD\_... variants also take a window identifier.
44
45 \twocolwidtha{7cm}
46 \begin{twocollist}\itemsep=0pt
47 \twocolitem{{\bf EVT\_GRID\_COL\_SIZE(func)}}{The user resized a column by dragging it. Processes a wxEVT\_GRID\_COL\_SIZE.}
48 \twocolitem{{\bf EVT\_GRID\_ROW\_SIZE(func)}}{The user resized a row by dragging it. Processes a wxEVT\_GRID\_ROW\_SIZE.}
49 \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.}
50 \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.}
51 \end{twocollist}%
52
53 The event handler for the following functions takes a
54 \helpref{wxGridRangeSelectEvent}{wxgridrangeselectevent} parameter.
55 The ...\_CMD\_... variant also takes a window identifier.
56
57 \twocolwidtha{7cm}
58 \begin{twocollist}\itemsep=0pt
59 \twocolitem{{\bf EVT\_GRID\_RANGE\_SELECT(func)}}{The user selected a group of contiguous cells. Processes a wxEVT\_GRID\_RANGE\_SELECT.}
60 \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.}
61 \end{twocollist}%
62
63 The event handler for the following functions takes a
64 \helpref{wxGridEditorCreatedEvent}{wxgrideditorcreatedevent} parameter.
65 The ...\_CMD\_... variant also takes a window identifier.
66
67 \twocolwidtha{7cm}
68 \begin{twocollist}\itemsep=0pt
69 \twocolitem{{\bf EVT\_GRID\_EDITOR\_CREATED(func)}}{The editor for a cell was created. Processes a wxEVT\_GRID\_EDITOR\_CREATED.}
70 \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.}
71 \end{twocollist}%
72
73 \wxheading{See also}
74
75 \helpref{wxGrid overview}{gridoverview}
76
77 %%%%%%%%%%% FUNCTION GROUPS %%%%%%%%%%%%%
78 \latexignore{\rtfignore{\wxheading{Function groups}}}
79
80 \membersection{Constructors and initialization}
81
82 \helpref{wxGrid}{wxgridctor}\\
83 \helpref{\destruct{wxGrid}}{wxgriddtor}\\
84 \helpref{CreateGrid}{wxgridcreategrid}\\
85 \helpref{SetTable}{wxgridsettable}
86
87 \membersection{Display format}
88
89 \membersection{Selection functions}
90
91 \helpref{wxGrid::ClearSelection}{wxgridclearselection}\\
92 \helpref{wxGrid::IsSelection}{wxgridisselection}\\
93 \helpref{wxGrid::SelectAll}{wxgridselectall}\\
94 \helpref{wxGrid::SelectBlock}{wxgridselectblock}\\
95 \helpref{wxGrid::SelectCol}{wxgridselectcol}\\
96 \helpref{wxGrid::SelectRow}{wxgridselectrow}
97
98 %%%%%%%%% MEMBER FUNCTIONS %%%%%%%%%%
99 \helponly{\insertatlevel{2}{
100
101 \wxheading{Members}
102
103 }}
104
105 \membersection{wxGrid::wxGrid}\label{wxgridctor}
106
107 \func{}{wxGrid}{\void}
108
109 Default constructor
110
111 \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}}
112
113 Constructor to create a grid object. Call either \helpref{wxGrid::CreateGrid}{wxgridcreategrid} or
114 \helpref{wxGrid::SetTable}{wxgridsettable} directly after this to initialize the grid before using
115 it.
116
117 \membersection{wxGrid::\destruct{wxGrid}}\label{wxgriddtor}
118
119 \func{}{\destruct{wxGrid}}{\void}
120
121 Destructor. This will also destroy the associated grid table unless you passed a table
122 object to the grid and specified that the grid should not take ownership of the
123 table (see \helpref{wxGrid::SetTable}{wxgridsettable}).
124
125 \membersection{wxGrid::AppendCols}\label{wxgridappendcols}
126
127 \func{bool}{AppendCols}{\param{int }{numCols = 1}, \param{bool }{updateLabels = true}}
128
129 Appends one or more new columns to the right of the grid and returns true if
130 successful. The updateLabels argument is not used at present.
131
132 If you are using a derived grid table class you will need to override
133 \helpref{wxGridTableBase::AppendCols}{wxgridtablebaseappendcols}. See
134 \helpref{wxGrid::InsertCols}{wxgridinsertcols} for further information.
135
136 \membersection{wxGrid::AppendRows}\label{wxgridappendrows}
137
138 \func{bool}{AppendRows}{\param{int }{numRows = 1}, \param{bool }{updateLabels = true}}
139
140 Appends one or more new rows to the bottom of the grid and returns true if
141 successful. The updateLabels argument is not used at present.
142
143 If you are using a derived grid table class you will need to override
144 \helpref{wxGridTableBase::AppendRows}{wxgridtablebaseappendrows}. See
145 \helpref{wxGrid::InsertRows}{wxgridinsertrows} for further information.
146
147 \membersection{wxGrid::AutoSize}\label{wxgridautosize}
148
149 \func{void}{AutoSize}{\void}
150
151 Automatically sets the height and width of all rows and columns to fit their contents.
152
153 \wxheading{Note}\\
154 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
155 The memory requirements for this could become prohibitive if your grid is very large.
156
157 \membersection{wxGrid::AutoSizeColumn}\label{wxgridautosizecolumn}
158
159 \func{void}{AutoSizeColumn}{\param{int }{col}, \param{bool }{setAsMin = true}}
160
161 Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will
162 also be set as the minimal width for the column.
163
164 \wxheading{Note}\\
165 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
166 The memory requirements for this could become prohibitive if your grid is very large.
167
168 \membersection{wxGrid::AutoSizeColumns}\label{wxgridautosizecolumns}
169
170 \func{void}{AutoSizeColumns}{\param{bool }{setAsMin = true}}
171
172 Automatically sizes all columns to fit their contents. If setAsMin is true the calculated widths will
173 also be set as the minimal widths for the columns.
174
175 \wxheading{Note}\\
176 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
177 The memory requirements for this could become prohibitive if your grid is very large.
178
179 \membersection{wxGrid::AutoSizeRow}\label{wxgridautosizerow}
180
181 \func{void}{AutoSizeRow}{\param{int }{row}, \param{bool }{setAsMin = true}}
182
183 Automatically sizes the row to fit its contents. If setAsMin is true the calculated height will
184 also be set as the minimal height for the row.
185
186 \wxheading{Note}\\
187 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
188 The memory requirements for this could become prohibitive if your grid is very large.
189
190 \membersection{wxGrid::AutoSizeRows}\label{wxgridautosizerows}
191
192 \func{void}{AutoSizeRows}{\param{bool }{setAsMin = true}}
193
194 Automatically sizes all rows to fit their contents. If setAsMin is true the calculated heights will
195 also be set as the minimal heights for the rows.
196
197 \wxheading{Note}\\
198 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
199 The memory requirements for this could become prohibitive if your grid is very large.
200
201 \membersection{wxGrid::BeginBatch}\label{wxgridbeginbatch}
202
203 \func{void}{BeginBatch}{\void}
204
205 Increments the grid's batch count. When the count is greater than zero repainting of
206 the grid is suppressed. Each call to BeginBatch must be matched by a later call to
207 \helpref{wxGrid::EndBatch}{wxgridendbatch}. Code that does a lot of grid
208 modification can be enclosed between BeginBatch and EndBatch calls to avoid
209 screen flicker. The final EndBatch will cause the grid to be repainted.
210
211 \membersection{wxGrid::CanDragColSize}\label{wxgridcandragcolsize}
212
213 \func{bool}{CanDragColSize}{\void}
214
215 Returns true if columns can be resized by dragging with the mouse. Columns can be resized
216 by dragging the edges of their labels. If grid line dragging is enabled they can also be
217 resized by dragging the right edge of the column in the grid cell area
218 (see \helpref{wxGrid::EnableDragGridSize}{wxgridenabledraggridsize}).
219
220 \membersection{wxGrid::CanDragRowSize}\label{wxgridcandragrowsize}
221
222 \func{bool}{CanDragRowSize}{\void}
223
224 Returns true if rows can be resized by dragging with the mouse. Rows can be resized
225 by dragging the edges of their labels. If grid line dragging is enabled they can also be
226 resized by dragging the lower edge of the row in the grid cell area
227 (see \helpref{wxGrid::EnableDragGridSize}{wxgridenabledraggridsize}).
228
229 \membersection{wxGrid::CanDragGridSize}\label{wxgridcandraggridsize}
230
231 \func{bool}{CanDragGridSize}{\void}
232
233 Return true if the dragging of grid lines to resize rows and columns is enabled or false otherwise.
234
235 \membersection{wxGrid::CanEnableCellControl}\label{wxgridcanenablecellcontrol}
236
237 \constfunc{bool}{CanEnableCellControl}{\void}
238
239 Returns true if the in-place edit control for the current grid cell can be used and
240 false otherwise (e.g. if the current cell is read-only).
241
242 \membersection{wxGrid::CellToRect}\label{wxgridcelltorect}
243
244 \func{wxRect}{CellToRect}{\param{int }{row}, \param{int }{col}}
245
246 \func{wxRect}{CellToRect}{\param{const wxGridCellCoords\& }{coords}}
247
248 Return the rectangle corresponding to the grid cell's size and position in logical
249 coordinates.
250
251 \membersection{wxGrid::ClearGrid}\label{wxgridcleargrid}
252
253 \func{void}{ClearGrid}{\void}
254
255 Clears all data in the underlying grid table and repaints the grid. The table is not deleted by
256 this function. If you are using a derived table class then you need to override
257 \helpref{wxGridTableBase::Clear}{wxgridtablebaseclear} for this function to have any effect.
258
259 \membersection{wxGrid::ClearSelection}\label{wxgridclearselection}
260
261 \func{void}{ClearSelection}{\void}
262
263 Deselects all cells that are currently selected.
264
265 \membersection{wxGrid::CreateGrid}\label{wxgridcreategrid}
266
267 \func{bool}{CreateGrid}{\param{int }{numRows}, \param{int }{numCols}, \param{wxGrid::wxGridSelectionModes }{selmode = wxGrid::wxGridSelectCells}}
268
269 Creates a grid with the specified initial number of rows and columns.
270 Call this directly after the grid constructor. When you use this
271 function wxGrid will create and manage a simple table of string values
272 for you. All of the grid data will be stored in memory.
273
274 For applications with more complex data types or relationships, or for
275 dealing with very large datasets, you should derive your own grid table
276 class and pass a table object to the grid with \helpref{wxGrid::SetTable}{wxgridsettable}.
277
278 \membersection{wxGrid::DeleteCols}\label{wxgriddeletecols}
279
280 \func{bool}{DeleteCols}{\param{int }{pos = 0}, \param{int }{numCols = 1}, \param{bool }{updateLabels = true}}
281
282 Deletes one or more columns from a grid starting at the specified position and returns
283 true if successful. The updateLabels argument is not used at present.
284
285 If you are using a derived grid table class you will need to override
286 \helpref{wxGridTableBase::DeleteCols}{wxgridtablebasedeletecols}. See
287 \helpref{wxGrid::InsertCols}{wxgridinsertcols} for further information.
288
289 \membersection{wxGrid::DeleteRows}\label{wxgriddeleterows}
290
291 \func{bool}{DeleteRows}{\param{int }{pos = 0}, \param{int }{numRows = 1}, \param{bool }{updateLabels = true}}
292
293 Deletes one or more rows from a grid starting at the specified position and returns
294 true if successful. The updateLabels argument is not used at present.
295
296 If you are using a derived grid table class you will need to override
297 \helpref{wxGridTableBase::DeleteRows}{wxgridtablebasedeleterows}. See
298 \helpref{wxGrid::InsertRows}{wxgridinsertrows} for further information.
299
300 \membersection{wxGrid::DisableCellEditControl}\label{wxgriddisablecelleditcontrol}
301
302 \func{void}{DisableCellEditControl}{\void}
303
304 Disables in-place editing of grid cells.
305 Equivalent to calling EnableCellEditControl(false).
306
307 \membersection{wxGrid::DisableDragColSize}\label{wxgriddisabledragcolsize}
308
309 \func{void}{DisableDragColSize}{\void}
310
311 Disables column sizing by dragging with the mouse. Equivalent to passing false to
312 \helpref{wxGrid::EnableDragColSize}{wxgridenabledragcolsize}.
313
314 \membersection{wxGrid::DisableDragGridSize}\label{wxgriddisabledraggridsize}
315
316 \func{void}{DisableDragGridSize}{\void}
317
318 Disable mouse dragging of grid lines to resize rows and columns. Equivalent to passing
319 false to \helpref{wxGrid::EnableDragGridSize}{wxgridenabledraggridsize}
320
321 \membersection{wxGrid::DisableDragRowSize}\label{wxgriddisabledragrowsize}
322
323 \func{void}{DisableDragRowSize}{\void}
324
325 Disables row sizing by dragging with the mouse. Equivalent to passing false to
326 \helpref{wxGrid::EnableDragRowSize}{wxgridenabledragrowsize}.
327
328 \membersection{wxGrid::EnableCellEditControl}\label{wxgridenablecelleditcontrol}
329
330 \func{void}{EnableCellEditControl}{\param{bool }{enable = true}}
331
332 Enables or disables in-place editing of grid cell data. The grid will issue either a
333 wxEVT\_GRID\_EDITOR\_SHOWN or wxEVT\_GRID\_EDITOR\_HIDDEN event.
334
335 \membersection{wxGrid::EnableDragColSize}\label{wxgridenabledragcolsize}
336
337 \func{void}{EnableDragColSize}{\param{bool }{enable = true}}
338
339 Enables or disables column sizing by dragging with the mouse.
340
341 \membersection{wxGrid::EnableDragGridSize}\label{wxgridenabledraggridsize}
342
343 \func{void}{EnableDragGridSize}{\param{bool }{enable = true}}
344
345 Enables or disables row and column resizing by dragging gridlines with the mouse.
346
347 \membersection{wxGrid::EnableDragRowSize}\label{wxgridenabledragrowsize}
348
349 \func{void}{EnableDragRowSize}{\param{bool }{enable = true}}
350
351 Enables or disables row sizing by dragging with the mouse.
352
353 \membersection{wxGrid::EnableEditing}\label{wxgridenableediting}
354
355 \func{void}{EnableEditing}{\param{bool }{edit}}
356
357 If the edit argument is false this function sets the whole grid as read-only. If the
358 argument is true the grid is set to the default state where cells may be editable. In the
359 default state you can set single grid cells and whole rows and columns to be editable or
360 read-only via
361 \helpref{wxGridCellAttribute::SetReadOnly}{wxgridcellattrsetreadonly}. For single
362 cells you can also use the shortcut function
363 \helpref{wxGrid::SetReadOnly}{wxgridsetreadonly}.
364
365 For more information about controlling grid cell attributes see the
366 \helpref{wxGridCellAttr}{wxgridcellattr} cell attribute class and the
367 \helpref{wxGrid classes overview}{gridoverview}.
368
369 \membersection{wxGrid::EnableGridLines}\label{wxgridenablegridlines}
370
371 \func{void}{EnableGridLines}{\param{bool }{enable = true}}
372
373 Turns the drawing of grid lines on or off.
374
375 \membersection{wxGrid::EndBatch}\label{wxgridendbatch}
376
377 \func{void}{EndBatch}{\void}
378
379 Decrements the grid's batch count. When the count is greater than zero repainting of
380 the grid is suppressed. Each previous call to
381 \helpref{wxGrid::BeginBatch}{wxgridbeginbatch} must be matched by a later call to
382 EndBatch. Code that does a lot of grid modification can be enclosed between
383 BeginBatch and EndBatch calls to avoid screen flicker. The final EndBatch will
384 cause the grid to be repainted.
385
386 \membersection{wxGrid::ForceRefresh}\label{wxgridforcerefresh}
387
388 \func{void}{ForceRefresh}{\void}
389
390 Causes immediate repainting of the grid. Use this instead of the usual wxWindow::Refresh.
391
392 \membersection{wxGrid::GetBatchCount}\label{wxgridgetbatchcount}
393
394 \func{int}{GetBatchCount}{\void}
395
396 Returns the number of times that \helpref{wxGrid::BeginBatch}{wxgridbeginbatch} has been called
397 without (yet) matching calls to \helpref{wxGrid::EndBatch}{wxgridendbatch}. While
398 the grid's batch count is greater than zero the display will not be updated.
399
400 \membersection{wxGrid::GetCellAlignment}\label{wxgridgetcellalignment}
401
402 \func{void}{GetCellAlignment}{\param{int }{row}, \param{int }{col}, \param{int* }{horiz}, \param{int* }{vert}}
403
404 Sets the arguments to the horizontal and vertical text alignment values for the
405 grid cell at the specified location.
406
407 Horizontal alignment will be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT. \\
408 Vertical alignment will be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM.
409
410 \perlnote{This method only takes the parameters {\tt row} and {\tt col} and
411 returns a 2-element list {\tt ( horiz, vert )}.}
412
413 \membersection{wxGrid::GetCellBackgroundColour}\label{wxgridgetcellbackgroundcolour}
414
415 \func{wxColour}{GetCellBackgroundColour}{\param{int }{row}, \param{int }{col}}
416
417 Returns the background colour of the cell at the specified location.
418
419 \membersection{wxGrid::GetCellEditor}\label{wxgridgetcelleditor}
420
421 \func{wxGridCellEditor*}{GetCellEditor}{\param{int }{row}, \param{int }{col}}
422
423 Returns a pointer to the editor for the cell at the specified location.
424
425 See \helpref{wxGridCellEditor}{wxgridcelleditor} and
426 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
427
428 \membersection{wxGrid::GetCellFont}\label{wxgridgetcellfont}
429
430 \func{wxFont}{GetCellFont}{\param{int }{row}, \param{int }{col}}
431
432 Returns the font for text in the grid cell at the specified location.
433
434 \membersection{wxGrid::GetCellRenderer}\label{wxgridgetcellrenderer}
435
436 \func{wxGridCellRenderer*}{GetCellRenderer}{\param{int }{row}, \param{int }{col}}
437
438 Returns a pointer to the renderer for the grid cell at the specified location.
439
440 See \helpref{wxGridCellRenderer}{wxgridcellrenderer} and
441 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
442
443 \membersection{wxGrid::GetCellTextColour}\label{wxgridgetcelltextcolour}
444
445 \func{wxColour}{GetCellTextColour}{\param{int }{row}, \param{int }{col}}
446
447 Returns the text colour for the grid cell at the specified location.
448
449 \membersection{wxGrid::GetCellValue}\label{wxgridgetcellvalue}
450
451 \func{wxString}{GetCellValue}{\param{int }{row}, \param{int }{col}}
452
453 \func{wxString}{GetCellValue}{\param{const wxGridCellCoords\&}{coords}}
454
455 Returns the string contained in the cell at the specified location. For simple applications where a
456 grid object automatically uses a default grid table of string values you use this function together
457 with \helpref{wxGrid::SetCellValue}{wxgridsetcellvalue} to access cell values.
458
459 For more complex applications where you have derived your own grid table class that contains
460 various data types (e.g. numeric, boolean or user-defined custom types) then you only use this
461 function for those cells that contain string values.
462
463 See \helpref{wxGridTableBase::CanGetValueAs}{wxgridtablebasecangetvalueas}
464 and the \helpref{wxGrid overview}{gridoverview} for more information.
465
466 \membersection{wxGrid::GetColLabelAlignment}\label{wxgridgetcollabelalignment}
467
468 \func{void}{GetColLabelAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
469
470 Sets the arguments to the current column label alignment values.
471
472 Horizontal alignment will be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT.\\
473 Vertical alignment will be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM.
474
475 \perlnote{This method takes no parameters and
476 returns a 2-element list {\tt ( horiz, vert )}.}
477
478 \membersection{wxGrid::GetColLabelSize}\label{wxgridgetcollabelsize}
479
480 \func{int}{GetColLabelSize}{\void}
481
482 Returns the current height of the column labels.
483
484 \membersection{wxGrid::GetColLabelValue}\label{wxgridgetcollabelvalue}
485
486 \func{wxString}{GetColLabelValue}{\param{int }{col}}
487
488 Returns the specified column label. The default grid table class provides column labels of
489 the form A,B...Z,AA,AB...ZZ,AAA... If you are using a custom grid table you can override
490 \helpref{wxGridTableBase::GetColLabelValue}{wxgridtablebasegetcollabelvalue} to provide
491 your own labels.
492
493 \membersection{wxGrid::GetColSize}\label{wxgridgetcolsize}
494
495 \func{int}{GetColSize}{\param{int }{col}}
496
497 Returns the width of the specified column.
498
499 \membersection{wxGrid::GetDefaultCellAlignment}\label{wxgridgetdefaultcellalignment}
500
501 \func{void}{GetDefaultCellAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
502
503 Sets the arguments to the current default horizontal and vertical text alignment
504 values.
505
506 Horizontal alignment will be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT. \\
507 Vertical alignment will be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM.
508
509 \membersection{wxGrid::GetDefaultCellBackgroundColour}\label{wxgridgetdefaultcellbackgroundcolour}
510
511 \func{wxColour}{GetDefaultCellBackgroundColour}{\void}
512
513 Returns the current default background colour for grid cells.
514
515 \membersection{wxGrid::GetDefaultCellFont}\label{wxgridgetdefaultcellfont}
516
517 \func{wxFont}{GetDefaultCellFont}{\void}
518
519 Returns the current default font for grid cell text.
520
521 \membersection{wxGrid::GetDefaultCellTextColour}\label{wxgridgetdefaultcelltextcolour}
522
523 \func{wxColour}{GetDefaultCellTextColour}{\void}
524
525 Returns the current default colour for grid cell text.
526
527 \membersection{wxGrid::GetDefaultColLabelSize}\label{wxgridgetdefaultcollabelsize}
528
529 \func{int}{GetDefaultColLabelSize}{\void}
530
531 Returns the default height for column labels.
532
533 \membersection{wxGrid::GetDefaultColSize}\label{wxgridgetdefaultcolsize}
534
535 \func{int}{GetDefaultColSize}{\void}
536
537 Returns the current default width for grid columns.
538
539 \membersection{wxGrid::GetDefaultEditor}\label{wxgridgetdefaulteditor}
540
541 \constfunc{wxGridCellEditor*}{GetDefaultEditor}{\void}
542
543 Returns a pointer to the current default grid cell editor.
544
545 See \helpref{wxGridCellEditor}{wxgridcelleditor} and
546 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
547
548 \membersection{wxGrid::GetDefaultRenderer}\label{wxgridgetdefaultrenderer}
549
550 \constfunc{wxGridCellRenderer*}{GetDefaultRenderer}{\void}
551
552 Returns a pointer to the current default grid cell renderer.
553
554 See \helpref{wxGridCellRenderer}{wxgridcellrenderer} and
555 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
556
557 \membersection{wxGrid::GetDefaultRowLabelSize}\label{wxgridgetdefaultrowlabelsize}
558
559 \func{int}{GetDefaultRowLabelSize}{\void}
560
561 Returns the default width for the row labels.
562
563 \membersection{wxGrid::GetDefaultRowSize}\label{wxgridgetdefaultrowsize}
564
565 \func{int}{GetDefaultRowSize}{\void}
566
567 Returns the current default height for grid rows.
568
569 \membersection{wxGrid::GetGridCursorCol}\label{wxgridgetgridcursorcol}
570
571 \func{int}{GetGridCursorCol}{\void}
572
573 Returns the current grid cell column position.
574
575 \membersection{wxGrid::GetGridCursorRow}\label{wxgridgetgridcursorrow}
576
577 \func{int}{GetGridCursorRow}{\void}
578
579 Returns the current grid cell row position.
580
581 \membersection{wxGrid::GetGridLineColour}\label{wxgridgetgridlinecolour}
582
583 \func{wxColour}{GetGridLineColour}{\void}
584
585 Returns the colour used for grid lines.
586
587 \membersection{wxGrid::GridLinesEnabled}\label{wxgridgridlinesenabled}
588
589 \func{bool}{GridLinesEnabled}{\void}
590
591 Returns true if drawing of grid lines is turned on, false otherwise.
592
593 \membersection{wxGrid::GetLabelBackgroundColour}\label{wxgridgetlabelbackgroundcolour}
594
595 \func{wxColour}{GetLabelBackgroundColour}{\void}
596
597 Returns the colour used for the background of row and column labels.
598
599 \membersection{wxGrid::GetLabelFont}\label{wxgridgetlabelfont}
600
601 \func{wxFont}{GetLabelFont}{\void}
602
603 Returns the font used for row and column labels.
604
605 \membersection{wxGrid::GetLabelTextColour}\label{wxgridgetlabeltextcolour}
606
607 \func{wxColour}{GetLabelTextColour}{\void}
608
609 Returns the colour used for row and column label text.
610
611 \membersection{wxGrid::GetNumberCols}\label{wxgridgetnumbercols}
612
613 \func{int}{GetNumberCols}{\void}
614
615 Returns the total number of grid columns (actually the number of columns in the underlying grid
616 table).
617
618 \membersection{wxGrid::GetNumberRows}\label{wxgridgetnumberrows}
619
620 \func{int}{GetNumberRows}{\void}
621
622 Returns the total number of grid rows (actually the number of rows in the underlying grid table).
623
624 \membersection{wxGrid::GetRowLabelAlignment}\label{wxgridgetrowlabelalignment}
625
626 \func{void}{GetRowLabelAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
627
628 Sets the arguments to the current row label alignment values.
629
630 Horizontal alignment will be one of wxLEFT, wxCENTRE or wxRIGHT. \\
631 Vertical alignment will be one of wxTOP, wxCENTRE or wxBOTTOM.
632
633 \perlnote{This method takes no parameters and
634 returns a 2-element list {\tt ( horiz, vert )}.}
635
636 \membersection{wxGrid::GetRowLabelSize}\label{wxgridgetrowlabelsize}
637
638 \func{int}{GetRowLabelSize}{\void}
639
640 Returns the current width of the row labels.
641
642 \membersection{wxGrid::GetRowLabelValue}\label{wxgridgetrowlabelvalue}
643
644 \func{wxString}{GetRowLabelValue}{\param{int }{row}}
645
646 Returns the specified row label. The default grid table class provides numeric row labels.
647 If you are using a custom grid table you can override
648 \helpref{wxGridTableBase::GetRowLabelValue}{wxgridtablebasegetcollabelvalue} to provide
649 your own labels.
650
651 \membersection{wxGrid::GetRowSize}\label{wxgridgetrowsize}
652
653 \func{int}{GetRowSize}{\param{int }{row}}
654
655 Returns the height of the specified row.
656
657 \membersection{wxGrid::GetSelectionMode}\label{wxgridgetselectionmode}
658
659 \constfunc{wxGrid::wxGridSelectionModes}{GetSelectionMode}{\void}
660
661 Returns the current selection mode, see \helpref{wxGrid::SetSelectionMode}{wxgridsetselectionmode}.
662
663 \membersection{wxGrid::GetSelectedCells}\label{wxgridgetselectedcells}
664
665 \constfunc{wxGridCellCoordsArray}{GetSelectedCells}{\void}
666
667 Returns an array of singly selected cells.
668
669 \membersection{wxGrid::GetSelectedCols}\label{wxgridgetselectedcols}
670
671 \constfunc{wxArrayInt}{GetSelectedCols}{\void}
672
673 Returns an array of selected cols.
674
675 \membersection{wxGrid::GetSelectedRows}\label{wxgridgetselectedrows}
676
677 \constfunc{wxArrayInt}{GetSelectedRows}{\void}
678
679 Returns an array of selected rows.
680
681 \membersection{wxGrid::GetSelectionBlockTopLeft}\label{wxgridgetselectionblocktopleft}
682
683 \constfunc{wxGridCellCoordsArray}{GetSelectionBlockTopLeft}{\void}
684
685 Returns an array of the top left corners of blocks of selected cells,
686 see \helpref{wxGrid::GetSelectionBlockBottomRight}{wxgridgetselectionblockbottomright}.
687
688 \membersection{wxGrid::GetSelectionBlockBottomRight}\label{wxgridgetselectionblockbottomright}
689
690 \constfunc{wxGridCellCoordsArray}{GetSelectionBlockBottomRight}{\void}
691
692 Returns an array of the bottom right corners of blocks of selected cells,
693 see \helpref{wxGrid::GetSelectionBlockTopLeft}{wxgridgetselectionblocktopleft}.
694
695 \membersection{wxGrid::GetTable}\label{wxgridgettable}
696
697 \constfunc{wxGridTableBase *}{GetTable}{\void}
698
699 Returns a base pointer to the current table object.
700
701 \membersection{wxGrid::HideCellEditControl}\label{wxgridhidecelleditcontrol}
702
703 \func{void}{HideCellEditControl}{\void}
704
705 Hides the in-place cell edit control.
706
707 \membersection{wxGrid::InsertCols}\label{wxgridinsertcols}
708
709 \func{bool}{InsertCols}{\param{int }{pos = 0}, \param{int }{numCols = 1}, \param{bool }{updateLabels = true}}
710
711 Inserts one or more new columns into a grid with the first new column at the
712 specified position and returns true if successful. The updateLabels argument is not
713 used at present.
714
715 The sequence of actions begins with the grid object requesting the underlying grid
716 table to insert new columns. If this is successful the table notifies the grid and the
717 grid updates the display. For a default grid (one where you have called
718 \helpref{wxGrid::CreateGrid}{wxgridcreategrid}) this process is automatic. If you are
719 using a custom grid table (specified with \helpref{wxGrid::SetTable}{wxgridsettable})
720 then you must override
721 \helpref{wxGridTableBase::InsertCols}{wxgridtablebaseinsertcols} in your derived
722 table class.
723
724 \membersection{wxGrid::InsertRows}\label{wxgridinsertrows}
725
726 \func{bool}{InsertRows}{\param{int }{pos = 0}, \param{int }{numRows = 1}, \param{bool }{updateLabels = true}}
727
728 Inserts one or more new rows into a grid with the first new row at the specified
729 position and returns true if successful. The updateLabels argument is not used at
730 present.
731
732 The sequence of actions begins with the grid object requesting the underlying grid
733 table to insert new rows. If this is successful the table notifies the grid and the
734 grid updates the display. For a default grid (one where you have called
735 \helpref{wxGrid::CreateGrid}{wxgridcreategrid}) this process is automatic. If you are
736 using a custom grid table (specified with \helpref{wxGrid::SetTable}{wxgridsettable})
737 then you must override
738 \helpref{wxGridTableBase::InsertRows}{wxgridtablebaseinsertrows} in your derived
739 table class.
740
741 \membersection{wxGrid::IsCellEditControlEnabled}\label{wxgridiscelleditcontrolenabled}
742
743 \constfunc{bool}{IsCellEditControlEnabled}{\void}
744
745 Returns true if the in-place edit control is currently enabled.
746
747 \membersection{wxGrid::IsCurrentCellReadOnly}\label{wxgridiscurrentcellreadonly}
748
749 \constfunc{bool}{IsCurrentCellReadOnly}{\void}
750
751 Returns true if the current cell has been set to read-only
752 (see \helpref{wxGrid::SetReadOnly}{wxgridsetreadonly}).
753
754 \membersection{wxGrid::IsEditable}\label{wxgridiseditable}
755
756 \func{bool}{IsEditable}{\void}
757
758 Returns false if the whole grid has been set as read-only or true otherwise.
759 See \helpref{wxGrid::EnableEditing}{wxgridenableediting} for more information about
760 controlling the editing status of grid cells.
761
762 \membersection{wxGrid::IsInSelection}\label{wxgridisinselection}
763
764 \constfunc{bool}{IsInSelection}{\param{int }{row}, \param{int }{col}}
765
766 \constfunc{bool}{IsInSelection}{\param{const wxGridCellCoords\& }{coords}}
767
768 Is this cell currently selected.
769
770 \membersection{wxGrid::IsReadOnly}\label{wxgridisreadonly}
771
772 \constfunc{bool}{IsReadOnly}{\param{int }{row}, \param{int }{col}}
773
774 Returns true if the cell at the specified location can't be edited.
775 See also \helpref{wxGrid::IsReadOnly}{wxgridisreadonly}.
776
777 \membersection{wxGrid::IsSelection}\label{wxgridisselection}
778
779 \func{bool}{IsSelection}{\void}
780
781 Returns true if there are currently rows, columns or blocks of cells selected.
782
783 \membersection{wxGrid::IsVisible}\label{wxgridisvisible}
784
785 \func{bool}{IsVisible}{\param{int }{row}, \param{int }{col}, \param{bool }{wholeCellVisible = true}}
786
787 \func{bool}{IsVisible}{\param{const wxGridCellCoords\& }{coords}, \param{bool }{wholeCellVisible = true}}
788
789 Returns true if a cell is either wholly visible (the default) or at least partially
790 visible in the grid window.
791
792 \membersection{wxGrid::MakeCellVisible}\label{wxgridmakecellvisible}
793
794 \func{void}{MakeCellVisible}{\param{int }{row}, \param{int }{col}}
795
796 \func{void}{MakeCellVisible}{\param{const wxGridCellCoords\& }{coords}}
797
798 Brings the specified cell into the visible grid cell area with minimal scrolling. Does
799 nothing if the cell is already visible.
800
801 \membersection{wxGrid::MoveCursorDown}\label{wxgridmovecursordown}
802
803 \func{bool}{MoveCursorDown}{\param{bool }{expandSelection}}
804
805 Moves the grid cursor down by one row. If a block of cells was previously selected it
806 will expand if the argument is true or be cleared if the argument is false.
807
808 \wxheading{Keyboard}\\
809 This function is called for Down cursor key presses or Shift+Down to expand a selection.
810
811 \membersection{wxGrid::MoveCursorLeft}\label{wxgridmovecursorleft}
812
813 \func{bool}{MoveCursorLeft}{\param{bool }{expandSelection}}
814
815 Moves the grid cursor left by one column. If a block of cells was previously selected it
816 will expand if the argument is true or be cleared if the argument is false.
817
818 \wxheading{Keyboard}\\
819 This function is called for Left cursor key presses or Shift+Left to expand a selection.
820
821 \membersection{wxGrid::MoveCursorRight}\label{wxgridmovecursorright}
822
823 \func{bool}{MoveCursorRight}{\param{bool }{expandSelection}}
824
825 Moves the grid cursor right by one column. If a block of cells was previously selected it
826 will expand if the argument is true or be cleared if the argument is false.
827
828 \wxheading{Keyboard}\\
829 This function is called for Right cursor key presses or Shift+Right to expand a selection.
830
831 \membersection{wxGrid::MoveCursorUp}\label{wxgridmovecursorup}
832
833 \func{bool}{MoveCursorUp}{\param{bool }{expandSelection}}
834
835 Moves the grid cursor up by one row. If a block of cells was previously selected it
836 will expand if the argument is true or be cleared if the argument is false.
837
838 \wxheading{Keyboard}\\
839 This function is called for Up cursor key presses or Shift+Up to expand a selection.
840
841 \membersection{wxGrid::MoveCursorDownBlock}\label{wxgridmovecursordownblock}
842
843 \func{bool}{MoveCursorDownBlock}{\param{bool }{expandSelection}}
844
845 Moves the grid cursor down in the current column such that it skips to the beginning or
846 end of a block of non-empty cells. If a block of cells was previously selected it
847 will expand if the argument is true or be cleared if the argument is false.
848
849 \wxheading{Keyboard}\\
850 This function is called for the Ctrl+Down key combination. Shift+Ctrl+Down expands a selection.
851
852 \membersection{wxGrid::MoveCursorLeftBlock}\label{wxgridmovecursorleftblock}
853
854 \func{bool}{MoveCursorLeftBlock}{\param{bool }{expandSelection}}
855
856 Moves the grid cursor left in the current row such that it skips to the beginning or
857 end of a block of non-empty cells. If a block of cells was previously selected it
858 will expand if the argument is true or be cleared if the argument is false.
859
860 \wxheading{Keyboard}\\
861 This function is called for the Ctrl+Left key combination. Shift+Ctrl+left expands a selection.
862
863 \membersection{wxGrid::MoveCursorRightBlock}\label{wxgridmovecursorrightblock}
864
865 \func{bool}{MoveCursorRightBlock}{\param{bool }{expandSelection}}
866
867 Moves the grid cursor right in the current row such that it skips to the beginning or
868 end of a block of non-empty cells. If a block of cells was previously selected it
869 will expand if the argument is true or be cleared if the argument is false.
870
871 \wxheading{Keyboard}\\
872 This function is called for the Ctrl+Right key combination. Shift+Ctrl+Right expands a selection.
873
874 \membersection{wxGrid::MoveCursorUpBlock}\label{wxgridmovecursorupblock}
875
876 \func{bool}{MoveCursorUpBlock}{\param{bool }{expandSelection}}
877
878 Moves the grid cursor up in the current column such that it skips to the beginning or
879 end of a block of non-empty cells. If a block of cells was previously selected it
880 will expand if the argument is true or be cleared if the argument is false.
881
882 \wxheading{Keyboard}\\
883 This function is called for the Ctrl+Up key combination. Shift+Ctrl+Up expands a selection.
884
885 \membersection{wxGrid::MovePageDown}\label{wxgridmovepagedown}
886
887 \func{bool}{MovePageDown}{\void}
888
889 Moves the grid cursor down by some number of rows so that the previous bottom visible row
890 becomes the top visible row.
891
892 \wxheading{Keyboard}\\
893 This function is called for PgDn keypresses.
894
895 \membersection{wxGrid::MovePageUp}\label{wxgridmovepageup}
896
897 \func{bool}{MovePageUp}{\void}
898
899 Moves the grid cursor up by some number of rows so that the previous top visible row
900 becomes the bottom visible row.
901
902 \wxheading{Keyboard}\\
903 This function is called for PgUp keypresses.
904
905 \membersection{wxGrid::SaveEditControlValue}\label{wxgridsaveeditcontrolvalue}
906
907 \func{void}{SaveEditControlValue}{\void}
908
909 Sets the value of the current grid cell to the current in-place edit control value.
910 This is called automatically when the grid cursor moves from the current cell to a
911 new cell. It is also a good idea to call this function when closing a grid since
912 any edits to the final cell location will not be saved otherwise.
913
914 \membersection{wxGrid::SelectAll}\label{wxgridselectall}
915
916 \func{void}{SelectAll}{\void}
917
918 Selects all cells in the grid.
919
920 \membersection{wxGrid::SelectBlock}\label{wxgridselectblock}
921
922 \func{void}{SelectBlock}{\param{int }{topRow}, \param{int }{leftCol},
923 \param{int }{bottomRow}, \param{int }{rightCol}, \param{bool }{addToSelected = false}}
924
925 \func{void}{SelectBlock}{\param{const wxGridCellCoords\& }{topLeft},
926 \param{const wxGridCellCoords\& }{bottomRight}, \param{bool }{addToSelected = false}}
927
928 Selects a rectangular block of cells. If addToSelected is false then any existing selection will be
929 deselected; if true the column will be added to the existing selection.
930
931 \membersection{wxGrid::SelectCol}\label{wxgridselectcol}
932
933 \func{void}{SelectCol}{\param{int }{col}, \param{bool }{addToSelected = false}}
934
935 Selects the specified column. If addToSelected is false then any existing selection will be
936 deselected; if true the column will be added to the existing selection.
937
938 \membersection{wxGrid::SelectRow}\label{wxgridselectrow}
939
940 \func{void}{SelectRow}{\param{int }{row}, \param{bool }{addToSelected = false}}
941
942 Selects the specified row. If addToSelected is false then any existing selection will be
943 deselected; if true the row will be added to the existing selection.
944
945 \membersection{wxGrid::SetCellAlignment}\label{wxgridsetcellalignment}
946
947 \func{void}{SetCellAlignment}{\param{int }{row}, \param{int }{col}, \param{int }{horiz}, \param{int }{vert}}
948
949 \func{void}{SetCellAlignment}{\param{int }{align}, \param{int }{row}, \param{int }{col}}
950
951 \func{void}{SetCellAlignment}{\param{int }{align}}
952
953 Sets the horizontal and vertical alignment for grid cell text at the specified location.
954
955 Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT. \\
956 Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM.
957
958 \membersection{wxGrid::SetCellEditor}\label{wxgridsetcelleditor}
959
960 \func{void}{SetCellEditor}{\param{int }{row}, \param{int }{col}, \param{wxGridCellEditor* }{editor}}
961
962 Sets the editor for the grid cell at the specified location.
963 The grid will take ownership of the pointer.
964
965 See \helpref{wxGridCellEditor}{wxgridcelleditor} and
966 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
967
968 \membersection{wxGrid::SetCellFont}\label{wxgridsetcellfont}
969
970 \func{void}{SetCellFont}{\param{int }{row}, \param{int }{col}, \param{const wxFont\&}{ font}}
971
972 Sets the font for text in the grid cell at the specified location.
973
974 \membersection{wxGrid::SetCellRenderer}\label{wxgridsetcellrenderer}
975
976 \func{void}{SetCellRenderer}{\param{int }{row}, \param{int }{col}, \param{wxGridCellRenderer* }{renderer}}
977
978 Sets the renderer for the grid cell at the specified location.
979 The grid will take ownership of the pointer.
980
981 See \helpref{wxGridCellRenderer}{wxgridcellrenderer} and
982 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
983
984 \membersection{wxGrid::SetCellTextColour}\label{wxgridsetcelltextcolour}
985
986 \func{void}{SetCellTextColour}{\param{int }{row}, \param{int }{col}, \param{const wxColour\&}{ colour}}
987
988 \func{void}{SetCellTextColour}{\param{const wxColour\& }{val}, \param{int }{row}, \param{int }{col}}
989
990 \func{void}{SetCellTextColour}{\param{const wxColour\& }{colour}}
991
992 Sets the text colour for the grid cell at the specified location.
993
994 \membersection{wxGrid::SetCellValue}\label{wxgridsetcellvalue}
995
996 \func{void}{SetCellValue}{\param{int }{row}, \param{int }{col}, \param{const wxString\& }{s}}
997
998 \func{void}{SetCellValue}{\param{const wxGridCellCoords\& }{coords}, \param{const wxString\& }{s}}
999
1000 \func{void}{SetCellValue}{\param{const wxString\& }{val}, \param{int }{row}, \param{int }{col}}
1001
1002 Sets the string value for the cell at the specified location. For simple applications where a
1003 grid object automatically uses a default grid table of string values you use this function together
1004 with \helpref{wxGrid::GetCellValue}{wxgridgetcellvalue} to access cell values.
1005
1006 For more complex applications where you have derived your own grid table class that contains
1007 various data types (e.g. numeric, boolean or user-defined custom types) then you only use this
1008 function for those cells that contain string values.
1009
1010 The last form is for backward compatibility only.
1011
1012 See \helpref{wxGridTableBase::CanSetValueAs}{wxgridtablebasecangetvalueas}
1013 and the \helpref{wxGrid overview}{gridoverview} for more information.
1014
1015 \membersection{wxGrid::SetColAttr}\label{wxgridsetcolattr}
1016
1017 \func{void}{SetColAttr}{\param{int }{col}, \param{wxGridCellAttr* }{attr}}
1018
1019 Sets the cell attributes for all cells in the specified column.
1020
1021 For more information about controlling grid cell attributes see the
1022 \helpref{wxGridCellAttr}{wxgridcellattr} cell attribute class and the
1023 \helpref{wxGrid classes overview}{gridoverview}.
1024
1025 \membersection{wxGrid::SetColFormatBool}\label{wxgridsetcolformatbool}
1026
1027 \func{void}{SetColFormatBool}{\param{int }{col}}
1028
1029 Sets the specified column to display boolean values. wxGrid displays boolean values with a checkbox.
1030
1031 \membersection{wxGrid::SetColFormatNumber}\label{wxgridsetcolformatnumber}
1032
1033 \func{void}{SetColFormatNumber}{\param{int }{col}}
1034
1035 Sets the specified column to display integer values.
1036
1037 \membersection{wxGrid::SetColFormatFloat}\label{wxgridsetcolformatfloat}
1038
1039 \func{void}{SetColFormatFloat}{\param{int }{col}, \param{int }{width = -1}, \param{int }{precision = -1}}
1040
1041 Sets the specified column to display floating point values with the given width and precision.
1042
1043 \membersection{wxGrid::SetColFormatCustom}\label{wxgridsetcolformatcustom}
1044
1045 \func{void}{SetColFormatCustom}{\param{int }{col}, \param{const wxString\& }{typeName}}
1046
1047 Sets the specified column to display data in a custom format.
1048 See the \helpref{wxGrid overview}{gridoverview} for more information on working
1049 with custom data types.
1050
1051 \membersection{wxGrid::SetColLabelAlignment}\label{wxgridsetcollabelalignment}
1052
1053 \func{void}{SetColLabelAlignment}{\param{int }{horiz}, \param{int }{vert}}
1054
1055 Sets the horizontal and vertical alignment of column label text.
1056
1057 Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT.
1058
1059 Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM.
1060
1061 \membersection{wxGrid::SetColLabelSize}\label{wxgridsetcollabelsize}
1062
1063 \func{void}{SetColLabelSize}{\param{int }{height}}
1064
1065 Sets the height of the column labels.
1066
1067 \membersection{wxGrid::SetColLabelValue}\label{wxgridsetcollabelvalue}
1068
1069 \func{void}{SetColLabelValue}{\param{int }{col}, \param{const wxString\&}{ value}}
1070
1071 Set the value for the given column label. If you are using a derived grid table you must
1072 override \helpref{wxGridTableBase::SetColLabelValue}{wxgridtablebasesetcollabelvalue}
1073 for this to have any effect.
1074
1075 \membersection{wxGrid::SetColMinimalWidth}\label{wxgridsetcolminimalwidth}
1076
1077 \func{void}{SetColMinimalWidth}{\param{int }{col}, \param{int }{width}}
1078
1079 Sets the minimal width for the specified column. This should normally be called when creating the grid
1080 because it will not resize a column that is already narrower than the minimal width.
1081 The width argument must be higher than the minimimal acceptable column width, see
1082 \helpref{wxGrid::GetColMinimalAcceptableWidth}{wxgridgetcolminimalacceptablewidth}.
1083
1084 \membersection{wxGrid::SetColMinimalAcceptableWidth}\label{wxgridsetcolminimalacceptablewidth}
1085
1086 \func{void}{SetColMinimalAcceptableWidth}{\param{int }{width}}
1087
1088 This modifies the minimum column width that can be handled correctly. Specifying a low value here
1089 allows smaller grid cells to be dealt with correctly. Specifying a value here which is much smaller
1090 than the actual minimum size will incur a performance penalty in the functions which perform
1091 grid cell index lookup on the basis of screen coordinates.
1092 This should normally be called when creating the grid because it will not resize existing columns
1093 with sizes smaller than the value specified here.
1094
1095 \membersection{wxGrid::GetColMinimalAcceptableWidth}\label{wxgridgetcolminimalacceptablewidth}
1096
1097 \func{int}{GetColMinimalAcceptableWidth}{}
1098
1099 This returns the value of the lowest column width that can be handled correctly. See
1100 member \helpref{SetColMinimalAcceptableWidth}{wxgridsetcolminimalacceptablewidth} for details.
1101
1102 \membersection{wxGrid::SetColSize}\label{wxgridsetcolsize}
1103
1104 \func{void}{SetColSize}{\param{int }{col}, \param{int }{width}}
1105
1106 Sets the width of the specified column.
1107
1108 This function does not refresh the grid. If you are calling it outside of a BeginBatch / EndBatch
1109 block you can use \helpref{wxGrid::ForceRefresh}{wxgridforcerefresh} to see the changes.
1110
1111 Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will
1112 also be set as the minimal width for the column.
1113
1114 \wxheading{Note}\\
1115 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
1116 The memory requirements for this could become prohibitive if your grid is very large.
1117
1118 \membersection{wxGrid::SetDefaultCellAlignment}\label{wxgridsetdefaultcellalignment}
1119
1120 \func{void}{SetDefaultCellAlignment}{\param{int }{horiz}, \param{int }{vert}}
1121
1122 Sets the default horizontal and vertical alignment for grid cell text.
1123
1124 Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT.
1125
1126 Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM.
1127
1128 \membersection{wxGrid::SetDefaultCellBackgroundColour}\label{wxgridsetdefaultcellbackgroundcolour}
1129
1130 \func{void}{SetDefaultCellBackgroundColour}{\param{const wxColour\&}{ colour}}
1131
1132 Sets the default background colour for grid cells.
1133
1134 \membersection{wxGrid::SetDefaultCellFont}\label{wxgridsetdefaultcellfont}
1135
1136 \func{void}{SetDefaultCellFont}{\param{const wxFont\&}{ font}}
1137
1138 Sets the default font to be used for grid cell text.
1139
1140 \membersection{wxGrid::SetDefaultEditor}\label{wxgridsetdefaulteditor}
1141
1142 \func{void}{SetDefaultEditor}{\param{wxGridCellEditor* }{editor}}
1143
1144 Sets the default editor for grid cells. The grid will take ownership of the pointer.
1145
1146 See \helpref{wxGridCellEditor}{wxgridcelleditor} and
1147 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
1148
1149 \membersection{wxGrid::SetDefaultRenderer}\label{wxgridsetdefaultrenderer}
1150
1151 \func{void}{SetDefaultRenderer}{\param{wxGridCellRenderer* }{renderer}}
1152
1153 Sets the default renderer for grid cells. The grid will take ownership of the pointer.
1154
1155 See \helpref{wxGridCellRenderer}{wxgridcellrenderer} and
1156 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
1157
1158 \membersection{wxGrid::SetDefaultColSize}\label{wxgridsetdefaultcolsize}
1159
1160 \func{void}{SetDefaultColSize}{\param{int }{width}, \param{bool }{resizeExistingCols = false}}
1161
1162 Sets the default width for columns in the grid. This will only affect columns subsequently added to
1163 the grid unless resizeExistingCols is true.
1164
1165 \membersection{wxGrid::SetDefaultRowSize}\label{wxgridsetdefaultrowsize}
1166
1167 \func{void}{SetDefaultRowSize}{\param{int }{height}, \param{bool }{resizeExistingRows = false}}
1168
1169 Sets the default height for rows in the grid. This will only affect rows subsequently added
1170 to the grid unless resizeExistingRows is true.
1171
1172 \membersection{wxGrid::SetGridCursor}\label{wxgridsetgridcursor}
1173
1174 \func{void}{SetGridCursor}{\param{int }{row}, \param{int }{col}}
1175
1176 Set the grid cursor to the specified cell.
1177 This function calls \helpref{wxGrid::MakeCellVisible}{wxgridmakecellvisible}.
1178
1179 \membersection{wxGrid::SetGridLineColour}\label{wxgridsetgridlinecolour}
1180
1181 \func{void}{SetGridLineColour}{\param{const wxColour\&}{colour}}
1182
1183 Sets the colour used to draw grid lines.
1184
1185 \membersection{wxGrid::SetLabelBackgroundColour}\label{wxgridsetlabelbackgroundcolour}
1186
1187 \func{void}{SetLabelBackgroundColour}{\param{const wxColour\&}{ colour}}
1188
1189 Sets the background colour for row and column labels.
1190
1191 \membersection{wxGrid::SetLabelFont}\label{wxgridsetlabelfont}
1192
1193 \func{void}{SetLabelFont}{\param{const wxFont\&}{ font}}
1194
1195 Sets the font for row and column labels.
1196
1197 \membersection{wxGrid::SetLabelTextColour}\label{wxgridsetlabeltextcolour}
1198
1199 \func{void}{SetLabelTextColour}{\param{const wxColour\&}{ colour}}
1200
1201 Sets the colour for row and column label text.
1202
1203 \membersection{wxGrid::SetReadOnly}\label{wxgridsetreadonly}
1204
1205 \func{void}{SetReadOnly}{\param{int }{row}, \param{int }{col}, \param{bool }{isReadOnly = true}}
1206
1207 Makes the cell at the specified location read-only or editable.
1208 See also \helpref{wxGrid::IsReadOnly}{wxgridisreadonly}.
1209
1210 \membersection{wxGrid::SetRowAttr}\label{wxgridsetrowattr}
1211
1212 \func{void}{SetRowAttr}{\param{int }{row}, \param{wxGridCellAttr* }{attr}}
1213
1214 Sets the cell attributes for all cells in the specified row.
1215 See the \helpref{wxGridCellAttr}{wxgridcellattr} class for more information
1216 about controlling cell attributes.
1217
1218 \membersection{wxGrid::SetRowLabelAlignment}\label{wxgridsetrowlabelalignment}
1219
1220 \func{void}{SetRowLabelAlignment}{\param{int }{horiz}, \param{int }{vert}}
1221
1222 Sets the horizontal and vertical alignment of row label text.
1223
1224 Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT.
1225
1226 Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM.
1227
1228 \membersection{wxGrid::SetRowLabelSize}\label{wxgridsetrowlabelsize}
1229
1230 \func{void}{SetRowLabelSize}{\param{int }{width}}
1231
1232 Sets the width of the row labels.
1233
1234 \membersection{wxGrid::SetRowLabelValue}\label{wxgridsetrowlabelvalue}
1235
1236 \func{void}{SetRowLabelValue}{\param{int }{row}, \param{const wxString\&}{ value}}
1237
1238 Set the value for the given row label. If you are using a derived grid table you must
1239 override \helpref{wxGridTableBase::SetRowLabelValue}{wxgridtablebasesetrowlabelvalue}
1240 for this to have any effect.
1241
1242 \membersection{wxGrid::SetRowMinimalHeight}\label{wxgridsetrowminimalheight}
1243
1244 \func{void}{SetRowMinimalHeight}{\param{int }{row}, \param{int }{height}}
1245
1246 Sets the minimal height for the specified row. This should normally be called when creating the grid
1247 because it will not resize a row that is already shorter than the minimal height.
1248 The height argument must be higher than the minimimal acceptable row height, see
1249 \helpref{wxGrid::GetRowMinimalAcceptableHeight}{wxgridgetrowminimalacceptableheight}.
1250
1251 \membersection{wxGrid::SetRowMinimalAcceptableHeight}\label{wxgridsetrowminimalacceptableheight}
1252
1253 \func{void}{SetRowMinimalAcceptableHeight}{\param{int }{height}}
1254
1255 This modifies the minimum row width that can be handled correctly. Specifying a low value here
1256 allows smaller grid cells to be dealt with correctly. Specifying a value here which is much smaller
1257 than the actual minimum size will incur a performance penalty in the functions which perform
1258 grid cell index lookup on the basis of screen coordinates.
1259 This should normally be called when creating the grid because it will not resize existing rows
1260 with sizes smaller than the value specified here.
1261
1262 \membersection{wxGrid::GetRowMinimalAcceptableHeight}\label{wxgridgetrowminimalacceptableheight}
1263
1264 \func{int}{GetRowMinimalAcceptableHeight}{}
1265
1266 This returns the value of the lowest row width that can be handled correctly. See
1267 member \helpref{SetRowMinimalAcceptableHeight}{wxgridsetrowminimalacceptableheight} for details.
1268
1269 \membersection{wxGrid::SetRowSize}\label{wxgridsetrowsize}
1270
1271 \func{void}{SetRowSize}{\param{int }{row}, \param{int }{height}}
1272
1273 Sets the height of the specified row.
1274
1275 This function does not refresh the grid. If you are calling it outside of a BeginBatch / EndBatch
1276 block you can use \helpref{wxGrid::ForceRefresh}{wxgridforcerefresh} to see the changes.
1277
1278 Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will
1279 also be set as the minimal width for the column.
1280
1281 \wxheading{Note}
1282
1283 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
1284 The memory requirements for this could become prohibitive if your grid is very large.
1285
1286 \membersection{wxGrid::SetSelectionMode}\label{wxgridsetselectionmode}
1287
1288 \func{void}{SetSelectionMode}{\param{wxGrid::wxGridSelectionModes}{ selmode}}
1289
1290 Set the selection behaviour of the grid.
1291
1292 \wxheading{Parameters}
1293
1294 \docparam{wxGrid::wxGridSelectCells}{The default mode where individual cells are selected.}
1295
1296 \docparam{wxGrid::wxGridSelectRows}{Selections will consist of whole rows.}
1297
1298 \docparam{wxGrid::wxGridSelectionColumns}{Selections will consist of whole columns.}
1299
1300 \membersection{wxGrid::SetTable}\label{wxgridsettable}
1301
1302 \func{bool}{SetTable}{\param{wxGridTableBase* }{table}, \param{bool }{takeOwnership = false}, \param{wxGrid::wxGridSelectionModes }{selmode = wxGrid::wxGridSelectCells}}
1303
1304 Passes a pointer to a custom grid table to be used by the grid. This should be called
1305 after the grid constructor and before using the grid object. If takeOwnership is set to
1306 true then the table will be deleted by the wxGrid destructor.
1307
1308 Use this function instead of \helpref{wxGrid::CreateGrid}{wxgridcreategrid} when your
1309 application involves complex or non-string data or data sets that are too large to fit
1310 wholly in memory.
1311
1312 \membersection{wxGrid::ShowCellEditControl}\label{wxgridshowcelleditcontrol}
1313
1314 \func{void}{ShowCellEditControl}{\void}
1315
1316 Displays the in-place cell edit control for the current cell.
1317
1318 \membersection{wxGrid::XToCol}\label{wxgridxtocol}
1319
1320 \func{int}{XToCol}{\param{int }{x}}
1321
1322 Returns the grid column that corresponds to the logical x coordinate. Returns
1323 wxNOT\_FOUND if there is no column at the x position.
1324
1325 \membersection{wxGrid::XToEdgeOfCol}\label{wxgridxtoedgeofcol}
1326
1327 \func{int}{XToEdgeOfCol}{\param{int }{x}}
1328
1329 Returns the column whose right hand edge is close to the given logical x position.
1330 If no column edge is near to this position wxNOT\_FOUND is returned.
1331
1332 \membersection{wxGrid::YToEdgeOfRow}\label{wxgridytoedgeofrow}
1333
1334 \func{int}{YToEdgeOfRow}{\param{int }{y}}
1335
1336 Returns the row whose bottom edge is close to the given logical y position.
1337 If no row edge is near to this position wxNOT\_FOUND is returned.
1338
1339 \membersection{wxGrid::YToRow}\label{wxgridytorow}
1340
1341 \func{int}{YToRow}{\param{int }{y}}
1342
1343 Returns the grid row that corresponds to the logical y coordinate. Returns
1344 wxNOT\_FOUND if there is no row at the y position.
1345
1346
1347 \membersection{wxGrid::BlockToDeviceRect}\label{wxgridblocktodevicerect}
1348
1349 \func{wxRect}{BlockToDeviceRect}{\param{const wxGridCellCoords \& }{topLeft}, \param{const wxGridCellCoords \& }{bottomRight}}
1350
1351 This function returns the rectangle that encloses the block of cells
1352 limited by TopLeft and BottomRight cell in device coords and clipped
1353 to the client size of the grid window.
1354
1355
1356 \membersection{wxGrid::SelectionToDeviceRect}\label{wxgridselectiontodevicerect}
1357
1358 \func{wxRect}{SelectionToDeviceRect}{\void}
1359
1360 This function returns the rectangle that encloses the selected cells
1361 in device coords and clipped to the client size of the grid window.
1362
1363
1364 \membersection{wxGrid::GetSelectionBackground}\label{wxgridgetselectionbackground}
1365
1366 \constfunc{wxColour}{GetSelectionBackground}{\void}
1367
1368 Access or update the selection fore/back colours
1369
1370
1371 \membersection{wxGrid::GetSelectionForeground}\label{wxgridgetselectionforeground}
1372
1373 \constfunc{wxColour}{GetSelectionForeground}{\void}
1374
1375
1376 \membersection{wxGrid::SetSelectionBackground}\label{wxgridsetselectionbackground}
1377
1378 \func{void}{SetSelectionBackground}{\param{const wxColour\& }{c}}
1379
1380
1381 \membersection{wxGrid::SetSelectionForeground}\label{wxgridsetselectionforeground}
1382
1383 \func{void}{SetSelectionForeground}{\param{const wxColour\& }{c}}
1384
1385
1386 \membersection{wxGrid::RegisterDataType}\label{wxgridregisterdatatype}
1387
1388 \func{void}{RegisterDataType}{\param{const wxString\& }{typeName}, \param{wxGridCellRenderer* }{renderer}, \param{wxGridCellEditor* }{editor}}
1389
1390 Methods for a registry for mapping data types to Renderers/Editors
1391
1392 \membersection{wxGrid::GetDefaultEditorForCell}\label{wxgridgetdefaulteditorforcell}
1393
1394 \constfunc{wxGridCellEditor*}{GetDefaultEditorForCell}{\param{int }{row}, \param{int }{col}}
1395
1396 \constfunc{wxGridCellEditor*}{GetDefaultEditorForCell}{\param{const wxGridCellCoords\& }{c}}
1397
1398
1399 \membersection{wxGrid::GetDefaultRendererForCell}\label{wxgridgetdefaultrendererforcell}
1400
1401 \constfunc{wxGridCellRenderer*}{GetDefaultRendererForCell}{\param{int }{row}, \param{int }{col}}
1402
1403
1404 \membersection{wxGrid::GetDefaultEditorForType}\label{wxgridgetdefaulteditorfortype}
1405
1406 \constfunc{wxGridCellEditor*}{GetDefaultEditorForType}{\param{const wxString\& }{typeName}}
1407
1408
1409 \membersection{wxGrid::GetDefaultRendererForType}\label{wxgridgetdefaultrendererfortype}
1410
1411 \constfunc{wxGridCellRenderer*}{GetDefaultRendererForType}{\param{const wxString\& }{typeName}}
1412
1413
1414 \membersection{wxGrid::SetMargins}\label{wxgridsetmargins}
1415
1416 \func{void}{SetMargins}{\param{int }{extraWidth}, \param{int }{extraHeight}}
1417
1418 A grid may occupy more space than needed for its rows/columns. This
1419 function allows to set how big this extra space is
1420
1421 \membersection{wxGrid::wxGrid}\label{wxgridwxgrid}
1422
1423 \func{}{wxGrid}{\param{wxWindow* }{parent}, \param{int }{x}, \param{int }{y}, \param{int }{w = -1}, \param{int }{h = -1}, \param{long }{style = wxWANTS\_CHARS}, \param{const wxString\& }{name = wxPanelNameStr}}
1424
1425 Backward compatibility.
1426
1427 \membersection{wxGrid::UpdateDimensions}\label{wxgridupdatedimensions}
1428
1429 \func{void}{UpdateDimensions}{\void}
1430
1431 Backward compatibility.
1432
1433 \membersection{wxGrid::GetRows}\label{wxgridgetrows}
1434
1435 \func{int}{GetRows}{\void}
1436
1437 Backward compatibility.
1438
1439 \membersection{wxGrid::GetCols}\label{wxgridgetcols}
1440
1441 \func{int}{GetCols}{\void}
1442
1443 Backward compatibility.
1444
1445 \membersection{wxGrid::GetCursorRow}\label{wxgridgetcursorrow}
1446
1447 \func{int}{GetCursorRow}{\void}
1448
1449 Backward compatibility.
1450
1451 \membersection{wxGrid::GetCursorColumn}\label{wxgridgetcursorcolumn}
1452
1453 \func{int}{GetCursorColumn}{\void}
1454
1455 Backward compatibility.
1456
1457 \membersection{wxGrid::GetScrollPosX}\label{wxgridgetscrollposx}
1458
1459 \func{int}{GetScrollPosX}{\void}
1460
1461 Backward compatibility.
1462
1463 \membersection{wxGrid::GetScrollPosY}\label{wxgridgetscrollposy}
1464
1465 \func{int}{GetScrollPosY}{\void}
1466
1467 Backward compatibility.
1468
1469 \membersection{wxGrid::SetScrollX}\label{wxgridsetscrollx}
1470
1471 \func{void}{SetScrollX}{\param{int }{x}}
1472
1473 Backward compatibility.
1474
1475 \membersection{wxGrid::SetScrollY}\label{wxgridsetscrolly}
1476
1477 \func{void}{SetScrollY}{\param{int }{y}}
1478
1479 Backward compatibility.
1480
1481 \membersection{wxGrid::SetColumnWidth}\label{wxgridsetcolumnwidth}
1482
1483 \func{void}{SetColumnWidth}{\param{int }{col}, \param{int }{width}}
1484
1485 Backward compatibility.
1486
1487 \membersection{wxGrid::GetColumnWidth}\label{wxgridgetcolumnwidth}
1488
1489 \func{int}{GetColumnWidth}{\param{int }{col}}
1490
1491 Backward compatibility.
1492
1493 \membersection{wxGrid::SetRowHeight}\label{wxgridsetrowheight}
1494
1495 \func{void}{SetRowHeight}{\param{int }{row}, \param{int }{height}}
1496
1497 Backward compatibility.
1498
1499 \membersection{wxGrid::GetViewHeight}\label{wxgridgetviewheight}
1500
1501 \func{int}{GetViewHeight}{\void}
1502
1503 Backward compatibility.
1504
1505 \membersection{wxGrid::GetViewWidth}\label{wxgridgetviewwidth}
1506
1507 \func{int}{GetViewWidth}{\void}
1508
1509 Returned number of whole cols visible.
1510
1511 \membersection{wxGrid::SetLabelSize}\label{wxgridsetlabelsize}
1512
1513 \func{void}{SetLabelSize}{\param{int }{orientation}, \param{int }{sz}}
1514
1515
1516 \membersection{wxGrid::GetLabelSize}\label{wxgridgetlabelsize}
1517
1518 \func{int}{GetLabelSize}{\param{int }{orientation}}
1519
1520
1521 \membersection{wxGrid::SetLabelAlignment}\label{wxgridsetlabelalignment}
1522
1523 \func{void}{SetLabelAlignment}{\param{int }{orientation}, \param{int }{align}}
1524
1525
1526 \membersection{wxGrid::GetLabelAlignment}\label{wxgridgetlabelalignment}
1527
1528 \func{int}{GetLabelAlignment}{\param{int }{orientation}, \param{int }{align}}
1529
1530
1531 \membersection{wxGrid::SetLabelValue}\label{wxgridsetlabelvalue}
1532
1533 \func{void}{SetLabelValue}{\param{int }{orientation}, \param{const wxString\& }{val}, \param{int }{pos}}
1534
1535
1536 \membersection{wxGrid::GetLabelValue}\label{wxgridgetlabelvalue}
1537
1538 \func{wxString}{GetLabelValue}{\param{int }{orientation}, \param{int }{pos}}
1539
1540
1541 \membersection{wxGrid::GetCellTextFont}\label{wxgridgetcelltextfont}
1542
1543 \constfunc{wxFont}{GetCellTextFont}{\void}
1544
1545 \constfunc{wxFont}{GetCellTextFont}{\param{int }{row}, \param{int }{col}}
1546
1547
1548 \membersection{wxGrid::SetCellTextFont}\label{wxgridsetcelltextfont}
1549
1550 \func{void}{SetCellTextFont}{\param{const wxFont\& }{fnt}}
1551
1552 \func{void}{SetCellTextFont}{\param{const wxFont\& }{fnt}, \param{int }{row}, \param{int }{col}}
1553
1554
1555 \membersection{wxGrid::SetCellBackgroundColour}\label{wxgridsetcellbackgroundcolour}
1556
1557 \func{void}{SetCellBackgroundColour}{\param{const wxColour\& }{col}}
1558
1559 \func{void}{SetCellBackgroundColour}{\param{int }{row}, \param{int }{col}, \param{const wxColour\&}{ colour}}
1560
1561 \func{void}{SetCellBackgroundColour}{\param{const wxColour\& }{colour}, \param{int }{row}, \param{int }{col}}
1562
1563
1564 \membersection{wxGrid::GetEditable}\label{wxgridgeteditable}
1565
1566 \func{bool}{GetEditable}{\void}
1567
1568
1569 \membersection{wxGrid::SetEditable}\label{wxgridseteditable}
1570
1571 \func{void}{SetEditable}{\param{bool }{edit = true}}
1572
1573
1574 \membersection{wxGrid::GetEditInPlace}\label{wxgridgeteditinplace}
1575
1576 \func{bool}{GetEditInPlace}{\void}
1577
1578
1579 \membersection{wxGrid::SetEditInPlace}\label{wxgridseteditinplace}
1580
1581 \func{void}{SetEditInPlace}{\param{bool }{edit = true}}
1582
1583
1584 \membersection{wxGrid::SetCellBitmap}\label{wxgridsetcellbitmap}
1585
1586 \func{void}{SetCellBitmap}{\param{wxBitmap* }{bitmap}, \param{int }{row}, \param{int }{col}}
1587
1588
1589 \membersection{wxGrid::SetDividerPen}\label{wxgridsetdividerpen}
1590
1591 \func{void}{SetDividerPen}{\param{const wxPen\& }{pen}}
1592
1593
1594 \membersection{wxGrid::GetDividerPen}\label{wxgridgetdividerpen}
1595
1596 \constfunc{wxPen\&}{GetDividerPen}{\void}
1597
1598
1599 \membersection{wxGrid::OnActivate}\label{wxgridonactivate}
1600
1601 \func{void}{OnActivate}{\param{bool }{active}}
1602
1603 \membersection{wxGrid::Fit}\label{wxgridfit}
1604
1605 \func{void}{Fit}{\void}
1606
1607 Overridden wxWindow methods
1608
1609 \membersection{wxGrid::DoGetBestSize}\label{wxgriddogetbestsize}
1610
1611 \constfunc{wxSize}{DoGetBestSize}{\void}
1612
1613 \membersection{wxGrid::InitRowHeights}\label{wxgridinitrowheights}
1614
1615 \func{void}{InitRowHeights}{\void}
1616
1617 NB: {\it never} access m\_row/col arrays directly because they are created
1618 on demand, {\it always} use accessor functions instead!
1619
1620 Init the m\_rowHeights/Bottoms arrays with default values.
1621
1622 \membersection{wxGrid::InitColWidths}\label{wxgridinitcolwidths}
1623
1624 \func{void}{InitColWidths}{\void}
1625
1626 Init the m\_colWidths/Rights arrays
1627
1628
1629 \membersection{wxGrid::GetColWidth}\label{wxgridgetcolwidth}
1630
1631 \constfunc{int}{GetColWidth}{\param{int }{col}}
1632
1633 Get the col/row coords
1634
1635
1636 \membersection{wxGrid::GetColLeft}\label{wxgridgetcolleft}
1637
1638 \constfunc{int}{GetColLeft}{\param{int }{col}}
1639
1640
1641 \membersection{wxGrid::GetColRight}\label{wxgridgetcolright}
1642
1643 \constfunc{int}{GetColRight}{\param{int }{col}}
1644
1645
1646 \membersection{wxGrid::GetRowHeight}\label{wxgridgetrowheight}
1647
1648 \constfunc{int}{GetRowHeight}{\param{int }{row}}
1649
1650 This function must be public for compatibility.
1651
1652 \membersection{wxGrid::GetRowTop}\label{wxgridgetrowtop}
1653
1654 \constfunc{int}{GetRowTop}{\param{int }{row}}
1655
1656
1657 \membersection{wxGrid::GetRowBottom}\label{wxgridgetrowbottom}
1658
1659 \constfunc{int}{GetRowBottom}{\param{int }{row}}
1660
1661
1662 \membersection{wxGrid::SetOrCalcColumnSizes}\label{wxgridsetorcalccolumnsizes}
1663
1664 \func{int}{SetOrCalcColumnSizes}{\param{bool }{calcOnly}, \param{bool }{setAsMin = true}}
1665
1666 Common part of AutoSizeColumn/Row() and GetBestSize()
1667
1668 \membersection{wxGrid::SetOrCalcRowSizes}\label{wxgridsetorcalcrowsizes}
1669
1670 \func{int}{SetOrCalcRowSizes}{\param{bool }{calcOnly}, \param{bool }{setAsMin = true}}
1671
1672 \membersection{wxGrid::AutoSizeColOrRow}\label{wxgridautosizecolorrow}
1673
1674 \func{void}{AutoSizeColOrRow}{\param{int }{n}, \param{bool }{setAsMin}, \param{bool }{column}}
1675
1676 Common part of AutoSizeColumn/Row() or row?
1677
1678 \membersection{wxGrid::GetColMinimalWidth}\label{wxgridgetcolminimalwidth}
1679
1680 \constfunc{int}{GetColMinimalWidth}{\param{int }{col}}
1681
1682 get the minimal width of the given column/row
1683
1684 \membersection{wxGrid::GetRowMinimalHeight}\label{wxgridgetrowminimalheight}
1685
1686 \constfunc{int}{GetRowMinimalHeight}{\param{int }{col}}
1687
1688 \membersection{wxGrid::CanHaveAttributes}\label{wxgridcanhaveattributes}
1689
1690 \func{bool}{CanHaveAttributes}{\void}
1691
1692 Do we have some place to store attributes in?
1693
1694 \membersection{wxGrid::GetOrCreateCellAttr}\label{wxgridgetorcreatecellattr}
1695
1696 \constfunc{wxGridCellAttr*}{GetOrCreateCellAttr}{\param{int }{row}, \param{int }{col}}
1697