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