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