]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/grid.tex
1. fixed crash in wxDateTime::ParseDate
[wxWidgets.git] / docs / latex / wx / grid.tex
CommitLineData
a660d684
KB
1\section{\class{wxGrid}}\label{wxgrid}
2
3wxGrid is a class for displaying and editing tabular information.
4
fa482912
JS
5{\bf Note:} there is a new grid implementation from wxWindows 2.1.14,
6with an API that is backwardly compatible with the one documented here.
7This documentation is awaiting updates for the new and improved API.
8
a660d684
KB
9\wxheading{Derived from}
10
11\helpref{wxPanel}{wxpanel}\\
12\helpref{wxWindow}{wxwindow}\\
13\helpref{wxEvtHandler}{wxevthandler}\\
14\helpref{wxObject}{wxobject}
15
954b8ae6
JS
16\wxheading{Include files}
17
18<wx/grid.h>
19
a660d684
KB
20\wxheading{Window styles}
21
c0b042fc
VZ
22There are no specific window styles for this class, but you may use different
23SetXXX() functions to change the controls behaviour (for example, to enable
24in-place editing).
a660d684
KB
25
26See also \helpref{window styles overview}{windowstyles}.
27
28\wxheading{See also}
29
30\helpref{wxGrid classes overview}{gridoverview}
31
32\latexignore{\rtfignore{\wxheading{Members}}}
33
34\membersection{wxGrid::wxGrid}\label{wxgridconstr}
35
eaaa6a06
JS
36\func{void}{wxGrid}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id}, \param{const wxPoint\&}{ pos},
37\rtfsp\param{const wxSize\&}{ size}, \param{long}{ style=0}, \param{const wxString\& }{name="grid"}}
a660d684
KB
38
39Constructor. Before using a wxGrid object, you must call CreateGrid to set up the required rows and columns.
40
41\membersection{wxGrid::AdjustScrollbars}\label{wxgridadjustscrollbars}
42
43\func{void}{AdjustScrollbars}{\void}
44
45Call this function whenever a change has been made via the API that might alter the scrollbar characteristics:
46particularly when adding or deleting rows, or changing row or column dimensions. For example,
47removing rows might make it unnecessary to show the vertical scrollbar.
48
49\membersection{wxGrid::AppendCols}\label{wxgridappendcols}
50
51\func{bool}{AppendCols}{\param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
52
53Appends {\it n} columns to the grid. If {\it updateLabels} is TRUE,
54the function OnChangeLabels is called to give the application the opportunity to relabel.
55
56\membersection{wxGrid::AppendRows}\label{wxgridappendrows}
57
58\func{bool}{AppendRows}{\param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
59
60Appends {\it n} rows to the grid. If {\it updateLabels} is TRUE,
61the function OnChangeLabels is called to give the application the opportunity to relabel.
62
63\membersection{wxGrid::BeginBatch}\label{wxgridbeginbatch}
64
65\func{void}{BeginBatch}{\void}
66
67Start a BeginBatch/EndBatch pair between which, calls to SetCellValue or
68SetCellBitmap will not cause a refresh. This allows you to speed up some operations
69(for example, setting several hundred cell values). You can nest, but not overlap,
70these two functions.
71
72See also \helpref{wxGrid::EndBatch}{wxgridendbatch}, \helpref{wxGrid::GetBatchCount}{wxgridgetbatchcount}.
73
74\membersection{wxGrid::CellHitTest}\label{wxgridcellhittest}
75
76\func{bool}{CellHitTest}{\param{int}{ x}, \param{int}{ y}, \param{int *}{row}, \param{int *}{col}}
77
78Returns TRUE if the x, y panel position coincides with a cell. If so, {\it row} and {\it col} are
79returned.
80
81\membersection{wxGrid::CreateGrid}\label{wxgridcreategrid}
82
83\func{bool}{CreateGrid}{\param{int}{ rows}, \param{int}{ cols}, \param{wxString **}{cellValues=NULL},
84 \param{short *}{widths=NULL}, \param{short}{ defaultWidth=wxGRID\_DEFAULT\_CELL\_WIDTH},
85 \param{short}{ defaultHeight=wxGRID\_DEFAULT\_CELL\_HEIGHT}}
86
87Creates a grid {\it rows} high and {\it cols} wide. You can optionally specify an array of initial values
88and widths, and/or default cell width and height.
89
90Call this function after creating the wxGrid object.
91
c9110876 92\pythonnote{Currently the {\tt cellValues} and {\tt widths} parameters
21f280f4
RD
93don't exisit in the wxPython version of this method. So in other
94words, the definition of the wxPython version of this method looks like this:
95\begin{verbatim}
96 CreateGrid(rows, cols,
97 defaultWidth = wxGRID_DEFAULT_CELL_WIDTH,
98 defaultHeight = wxGRID_DEFAULT_CELL_HEIGHT)
99\end{verbatim}
100}
101
a660d684
KB
102\membersection{wxGrid::CurrentCellVisible}\label{wxgridcurrentcellvisible}
103
104\func{bool}{CurrentCellVisible}{\void}
105
106Returns TRUE if the currently selected cell is visible, FALSE otherwise.
107
108\membersection{wxGrid::DeleteCols}\label{wxgriddeletecols}
109
110\func{bool}{DeleteCols}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
111
112Deletes {\it n} columns from the grid at position {\it pos}. If {\it updateLabels} is TRUE,
113the function OnChangeLabels is called to give the application the opportunity to relabel.
114
115\membersection{wxGrid::DeleteRows}\label{wxgriddeleterows}
116
117\func{bool}{DeleteRows}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
118
119Deletes {\it n} rows from the grid at position {\it pos}. If {\it updateLabels} is TRUE,
120the function OnChangeLabels is called to give the application the opportunity to relabel.
121
122\membersection{wxGrid::EndBatch}\label{wxgridendbatch}
123
124\func{void}{EndBatch}{\void}
125
126End a BeginBatch/EndBatch pair between which, calls to SetCellValue or
127SetCellBitmap will not cause a refresh. This allows you to speed up some operations
128(for example, setting several hundred cell values). You can nest, but not overlap,
129these two functions.
130
131See also \helpref{wxGrid::BeginBatch}{wxgridbeginbatch}, \helpref{wxGrid::GetBatchCount}{wxgridgetbatchcount}.
132
133\membersection{wxGrid::GetBatchCount}\label{wxgridgetbatchcount}
134
c0ed460c 135\constfunc{int}{GetBatchCount}{\void}
a660d684
KB
136
137Return the level of batch nesting. This is initially zero, and will be incremented
138every time BeginBatch is called, and decremented when EndBatch is called. When the
139batch count is more zero, some functions (such as SetCellValue and SetCellBitmap) will
140not refresh the cell.
141
142See also \helpref{wxGrid::BeginBatch}{wxgridbeginbatch}, \helpref{wxGrid::EndBatch}{wxgridendbatch}.
143
144\membersection{wxGrid::GetCell}\label{wxgridgetcell}
145
c0ed460c 146\constfunc{wxGridCell *}{GetCell}{\param{int}{ row}, \param{int}{ col}}
a660d684
KB
147
148Returns the grid cell object associated with this position.
149
150wxGenericGrid implementation only.
151
152\membersection{wxGrid::GetCellAlignment}\label{wxgridgetcellalignment}
153
c0ed460c 154\constfunc{int}{GetCellAlignment}{\param{int}{ row}, \param{int}{ col}}
a660d684 155
c0ed460c 156\constfunc{int}{GetCellAlignment}{\void}
a660d684
KB
157
158Sets the text alignment for the cell at the given position, or the global alignment value.
159The return value is wxLEFT, wxRIGHT or wxCENTRE.
160
21f280f4
RD
161\pythonnote{In place of a single overloaded method name, wxPython
162implements the following methods:\par
163\indented{2cm}{\begin{twocollist}
c9110876
VS
164\twocolitem{{\bf GetCellAlignment(row, col)}}{}
165\twocolitem{{\bf GetDefCellAlignment()}}{}
21f280f4
RD
166\end{twocollist}}
167}
168
a660d684
KB
169\membersection{wxGrid::GetCellBackgroundColour}\label{wxgridgetcellbackgroundcolour}
170
c0ed460c 171\constfunc{wxColour\&}{GetCellBackgroundColour}{\param{int}{ row}, \param{int}{ col}}
a660d684 172
c0ed460c 173\constfunc{wxColour\&}{GetCellBackgroundColour}{\void}
a660d684
KB
174
175Gets the background colour for the cell at the given position, or the global background colour.
176
21f280f4
RD
177\pythonnote{In place of a single overloaded method name, wxPython
178implements the following methods:\par
179\indented{2cm}{\begin{twocollist}
c9110876
VS
180\twocolitem{{\bf GetCellBackgroundColour(row, col)}}{}
181\twocolitem{{\bf GetDefCellBackgroundColourt()}}{}
21f280f4
RD
182\end{twocollist}}
183}
184
a660d684
KB
185\membersection{wxGrid::GetCells}\label{wxgridgetcells}
186
c0ed460c 187\constfunc{wxGridCell ***}{GetCells}{\void}
a660d684
KB
188
189Returns the array of grid cell object associated with this wxGrid.
190
191\membersection{wxGrid::GetCellTextColour}\label{wxgridgetcelltextcolour}
192
c0ed460c 193\constfunc{wxColour\&}{GetCellTextColour}{\param{int}{ row}, \param{int}{ col}}
a660d684 194
c0ed460c 195\constfunc{wxColour\&}{GetCellTextColour}{\void}
a660d684
KB
196
197Gets the text colour for the cell at the given position, or the global text colour.
198
21f280f4
RD
199\pythonnote{In place of a single overloaded method name, wxPython
200implements the following methods:\par
201\indented{2cm}{\begin{twocollist}
c9110876
VS
202\twocolitem{{\bf GetCellTextColour(row, col)}}{}
203\twocolitem{{\bf GetDefCellTextColour()}}{}
21f280f4
RD
204\end{twocollist}}
205}
206
a660d684
KB
207\membersection{wxGrid::GetCellTextFont}\label{wxgridgetcelltextfont}
208
c0ed460c 209\constfunc{const wxFont\&}{GetCellTextFont}{\param{int}{ row}, \param{int}{ col}}
a660d684 210
c0ed460c 211\constfunc{wxFont\&}{GetCellTextFont}{\void}
a660d684
KB
212
213Gets the text font for the cell at the given position, or the global text font.
214
21f280f4
RD
215\pythonnote{In place of a single overloaded method name, wxPython
216implements the following methods:\par
217\indented{2cm}{\begin{twocollist}
c9110876
VS
218\twocolitem{{\bf GetCellTextFont(row, col)}}{}
219\twocolitem{{\bf GetDefCellTextFont()}}{}
21f280f4
RD
220\end{twocollist}}
221}
222
a660d684
KB
223\membersection{wxGrid::GetCellValue}\label{wxgridgetcellvalue}
224
c0ed460c 225\constfunc{wxString\&}{GetCellValue}{\param{int}{ row}, \param{int}{ col}}
a660d684
KB
226
227Returns the cell value at the given position.
228
229\membersection{wxGrid::GetCols}\label{wxgridgetcols}
230
c0ed460c 231\constfunc{int}{GetCols}{\void}
a660d684
KB
232
233Returns the number of columns in the grid.
234
235\membersection{wxGrid::GetColumnWidth}\label{wxgridcolumnwidth}
236
c0ed460c 237\constfunc{int}{GetColumnWidth}{\param{int}{ col}}
a660d684
KB
238
239Gets the width in pixels for column {\it col}.
240
241\membersection{wxGrid::GetCurrentRect}\label{wxgridgetcurrentrect}
242
c0ed460c 243\constfunc{wxRectangle *}{GetCurrentRect}{\void}
a660d684
KB
244
245Returns a pointer to the rectangle enclosing the currently selected cell.
246Do not delete this pointer.
247
248\membersection{wxGrid::GetCursorColumn}\label{wxgridgetcursorcolumn}
249
c0ed460c 250\constfunc{int}{GetCursorColumn}{\void}
a660d684
KB
251
252Returns the column position of the currently selected cell.
253
254\membersection{wxGrid::GetCursorRow}\label{wxgridgetcursorrow}
255
c0ed460c 256\constfunc{int}{GetCursorRow}{\void}
a660d684
KB
257
258Returns the row position of the currently selected cell.
259
260\membersection{wxGrid::GetEditable}\label{wxgridgeteditable}
261
c0ed460c 262\constfunc{bool}{GetEditable}{\void}
a660d684
KB
263
264Returns TRUE if the grid cells can be edited.
265
c0b042fc
VZ
266\membersection{wxGrid::GetEditInPlace}\label{wxgridgeteditinplace}
267
268\constfunc{bool}{GetEditInPlace}{\void}
269
270Returns TRUE if editing in-place is enabled.
271
a660d684
KB
272\membersection{wxGrid::GetHorizScrollBar}\label{wxgridgethorizscrollbar}
273
c0ed460c 274\constfunc{wxScrollBar *}{GetHorizScrollBar}{\void}
a660d684
KB
275
276Returns a pointer to the horizontal scrollbar.
277
278\membersection{wxGrid::GetLabelAlignment}\label{wxgridgetlabelalignment}
279
c0ed460c 280\constfunc{int}{GetLabelAlignment}{\param{int}{ orientation}}
a660d684
KB
281
282Gets the row or column label alignment. {\it orientation} should
283be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
284{\it alignment} should be wxCENTRE, wxLEFT or wxRIGHT.
285
286\membersection{wxGrid::GetLabelBackgroundColour}\label{wxgridgetlabelbackgroundcolour}
287
c0ed460c 288\constfunc{wxColour\&}{GetLabelBackgroundColour}{\void}
a660d684
KB
289
290Gets a row and column label text colour.
291
292\membersection{wxGrid::GetLabelSize}\label{wxgridgetlabelsize}
293
c0ed460c 294\constfunc{int}{GetLabelSize}{\param{int}{ orientation}}
a660d684
KB
295
296Gets the row label height, or column label width, in pixels. {\it orientation} should
297be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.
298
299\membersection{wxGrid::GetLabelTextColour}\label{wxgridgetlabeltextcolour}
300
c0ed460c 301\constfunc{wxColour\&}{GetLabelTextColour}{\void}
a660d684
KB
302
303Gets a row and column label text colour.
304
305\membersection{wxGrid::GetLabelTextFont}\label{wxgridgetlabeltextfont}
306
c0ed460c 307\constfunc{wxFont\&}{GetLabelTextFont}{\void}
a660d684
KB
308
309Gets the font to be used for the row and column labels.
310
311\membersection{wxGrid::GetLabelValue}\label{wxgridgetlabelvalue}
312
c0ed460c 313\constfunc{wxString\&}{GetLabelValue}{\param{int}{ orientation}, \param{int}{ pos}}
a660d684
KB
314
315Gets a row or column label value. {\it orientation} should
316be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
317{\it pos} is the label position.
318
319\membersection{wxGrid::GetRowHeight}\label{wxgridgetrowheight}
320
c0ed460c 321\constfunc{int}{GetRowHeight}{\param{int}{ row}}
a660d684
KB
322
323Gets the height in pixels for row {\it row}.
324
325\membersection{wxGrid::GetRows}\label{wxgridgetrows}
326
c0ed460c 327\constfunc{int}{GetRows}{\void}
a660d684
KB
328
329Returns the number of rows in the grid.
330
331\membersection{wxGrid::GetScrollPosX}\label{wxgridgetscrollposx}
332
c0ed460c 333\constfunc{int}{GetScrollPosX}{\void}
a660d684
KB
334
335Returns the column scroll position.
336
337\membersection{wxGrid::GetScrollPosY}\label{wxgridgetscrollposy}
338
c0ed460c 339\constfunc{int}{GetScrollPosY}{\void}
a660d684
KB
340
341Returns the row scroll position.
342
343\membersection{wxGrid::GetTextItem}\label{wxgridgettextitem}
344
fa482912 345\constfunc{wxTextCtrl *}{GetTextItem}{\void}
a660d684
KB
346
347Returns a pointer to the text item used for entering text into a cell.
348
349\membersection{wxGrid::GetVertScrollBar}\label{wxgridgetvertscrollbar}
350
c0ed460c 351\constfunc{wxScrollBar *}{GetVertScrollBar}{\void}
a660d684
KB
352
353Returns a pointer to the vertical scrollbar.
354
355\membersection{wxGrid::InsertCols}\label{wxgridinsertcols}
356
357\func{bool}{InsertCols}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
358
359Inserts {\it n} number of columns before position {\it pos}. If {\it updateLabels} is TRUE,
360the function OnChangeLabels is called to give the application the opportunity to relabel.
361
362\membersection{wxGrid::InsertRows}\label{wxgridinsertrows}
363
364\func{bool}{InsertRows}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
365
366Inserts {\it n} number of rows before position {\it pos}. If {\it updateLabels} is TRUE,
367the function OnChangeLabels is called to give the application the opportunity to relabel.
368
369\membersection{wxGrid::OnActivate}\label{wxgridonactivate}
370
371\func{void}{OnActivate}{\param{bool}{ active}}
372
373Sets the text item to have the focus. Call this function when the wxGrid window should have the
374focus, for example from wxFrame::OnActivate.
375
376\membersection{wxGrid::OnChangeLabels}\label{wxgridonchangelabels}
377
378\func{void}{OnChangeLabels}{\void}
379
380Called when rows and columns are created or deleted, to allow the application an
381opportunity to update the labels. By default, columns are labelled alphabetically,
382and rows numerically.
383
384\membersection{wxGrid::OnChangeSelectionLabel}\label{wxgridonchangeselectionlabel}
385
386\func{void}{OnChangeSelectionLabel}{\void}
387
388Called when a cell is selected, to allow the application an
fa482912 389opportunity to update the selection label (the label of the wxTextCtrl
a660d684
KB
390used for entering cell text). By default, the cell column letter and row
391number are concatenated to form the selection label.
392
393\membersection{wxGrid::OnCreateCell}\label{wxgridoncreatecell}
394
395\func{wxGridCell *}{OnCreateCell}{\void}
396
397Override this virtual function if you want to replace the normal wxGridCell with a derived
398class.
399
400\membersection{wxGrid::OnCellLeftClick}\label{wxgridoncellleftclick}
401
402\func{void}{OnLeftClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}}
403
404Virtual function called when the left button is depressed within a cell, just after OnSelectCell is called.
405
406\membersection{wxGrid::OnCellRightClick}\label{wxgridoncellrightclick}
407
408\func{void}{OnRightClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}}
409
410Virtual function called when the right button is depressed within a cell, just after OnSelectCell is called.
411
412\membersection{wxGrid::OnLabelLeftClick}\label{wxgridonlabelleftclick}
413
414\func{void}{OnLeftClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}}
415
416Virtual function called when the left button is depressed within a
21f280f4 417label.
a660d684
KB
418
419{\it row} will be {\it -1} if the click is in the top labels.
420
421{\it col} will be {\it -1} if the click is in the left labels.
422
423{\it row} and {\it col} will be {\it -1} if the click is in the upper
424left corner.
425
426\membersection{wxGrid::OnLabelRightClick}\label{wxgridonlabelrightclick}
427
428\func{void}{OnRightClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}}
429
430Virtual function called when the right button is depressed within a label.
431
432{\it row} will be {\it -1} if the click is in the top labels.
433
434{\it col} will be {\it -1} if the click is in the left labels.
435
436{\it row} and {\it col} will be {\it -1} if the click is in the upper
437left corner.
438
439\membersection{wxGrid::OnSelectCell}\label{wxgridonselectcell}
440
441\func{void}{OnSelectCell}{\param{int}{ row}, \param{int}{ col}}
442
443Virtual function called when the user left-clicks on a cell.
444
445\membersection{wxGrid::OnSelectCellImplementation}\label{wxgridonselectcellimplementation}
446
447\func{void}{OnSelectCellImplementation}{\param{wxDC *}{dc}, \param{int}{ row}, \param{int}{ col}}
448
449Virtual function called when the user left-clicks on a cell. If you override this function,
450call wxGrid::OnSelectCell to apply the default behaviour.
451
452\membersection{wxGrid::SetCellAlignment}\label{wxgridsetcellalignment}
453
454\func{void}{SetCellAlignment}{\param{int}{ alignment}, \param{int}{ row}, \param{int}{ col}}
455
456\func{void}{SetCellAlignment}{\param{int}{ alignment}}
457
458Sets the text alignment for the cell at the given position, or for the whole grid. {\it alignment} may be wxLEFT, wxRIGHT or wxCENTRE.
459
21f280f4
RD
460\pythonnote{In place of a single overloaded method name, wxPython
461implements the following methods:\par
462\indented{2cm}{\begin{twocollist}
c9110876
VS
463\twocolitem{{\bf SetCellAlignment(alignment, row, col)}}{}
464\twocolitem{{\bf SetDefCellAlignment(alignment)}}{}
21f280f4
RD
465\end{twocollist}}
466}
467
a660d684
KB
468\membersection{wxGrid::SetCellBackgroundColour}\label{wxgridsetcellbackgroundcolour}
469
470\func{void}{SetCellBackgroundColour}{\param{const wxColour\&}{ colour}, \param{int}{ row}, \param{int}{ col}}
471
472\func{void}{SetCellBackgroundColour}{\param{const wxColour\&}{ colour}}
473
474Sets the background colour for the cell at the given position, or for the whole grid.
475
21f280f4
RD
476\pythonnote{In place of a single overloaded method name, wxPython
477implements the following methods:\par
478\indented{2cm}{\begin{twocollist}
c9110876
VS
479\twocolitem{{\bf SetCellBackgroundColour(colour, row, col)}}{}
480\twocolitem{{\bf SetDefCellBackgroundColour(colour)}}{}
21f280f4
RD
481\end{twocollist}}
482}
483
a660d684
KB
484\membersection{wxGrid::SetCellTextColour}\label{wxgridsetcelltextcolour}
485
486\func{void}{SetCellTextColour}{\param{const wxColour\&}{ colour}, \param{int}{ row}, \param{int}{ col}}
487
488\func{void}{SetCellTextColour}{\param{const wxColour\&}{ colour}}
489
490Sets the text colour for the cell at the given position, or for the whole grid.
491
21f280f4
RD
492\pythonnote{In place of a single overloaded method name, wxPython
493implements the following methods:\par
494\indented{2cm}{\begin{twocollist}
c9110876
VS
495\twocolitem{{\bf SetCellTextColour(colour, row, col)}}{}
496\twocolitem{{\bf SetDefCellTextColour(colour)}}{}
21f280f4
RD
497\end{twocollist}}
498}
499
a660d684
KB
500\membersection{wxGrid::SetCellTextFont}\label{wxgridsetcelltextfont}
501
c0ed460c 502\func{void}{SetCellTextFont}{\param{const wxFont\&}{ font}, \param{int}{ row}, \param{int}{ col}}
a660d684 503
c0ed460c 504\func{void}{SetCellTextFont}{\param{const wxFont\&}{ font}}
a660d684
KB
505
506Sets the text font for the cell at the given position, or for the whole grid.
507
21f280f4
RD
508\pythonnote{In place of a single overloaded method name, wxPython
509implements the following methods:\par
510\indented{2cm}{\begin{twocollist}
c9110876
VS
511\twocolitem{{\bf SetCellTextFont(font, row, col)}}{}
512\twocolitem{{\bf SetDefCellTextFont(font)}}{}
21f280f4
RD
513\end{twocollist}}
514}
515
a660d684
KB
516\membersection{wxGrid::SetCellValue}\label{wxgridsetcellvalue}
517
518\func{void}{SetCellValue}{\param{const wxString\&}{ val}, \param{int}{ row}, \param{int}{ col}}
519
520Sets the cell value at the given position.
521
522\membersection{wxGrid::SetColumnWidth}\label{wxgridsetcolumnwidth}
523
524\func{void}{SetColumnWidth}{\param{int}{ col}, \param{int}{ width}}
525
526Sets the width in pixels for column {\it col}.
527
528\membersection{wxGrid::SetDividerPen}\label{wxgridsetdividerpen}
529
c0ed460c 530\func{void}{SetDividerPen}{\param{const wxPen\&}{ pen}}
a660d684
KB
531
532Specifies the pen to be used for drawing the divisions between cells. The default
533is a light grey. If NULL is specified, the divisions will not be drawn.
534
535\membersection{wxGrid::SetEditable}\label{wxgridseteditable}
536
537\func{void}{SetEditable}{\param{bool}{ editable}}
538
539If {\it editable} is TRUE (the default), the grid cells will be editable by means of the
540text edit control. If FALSE, the text edit control will be hidden and the user will not
541be able to edit the cell contents.
542
c0b042fc
VZ
543\membersection{wxGrid::SetEditInPlace}\label{wxgridseteditinplace}
544
545\func{void}{SetEditInPlace}{\param{bool}{ edit = TRUE}}
546
547Enables (if {\it edit} is TRUE, default value) or disables in-place editing.
548When it is enabled, the cells contents can be changed by typing text directly
549in the cell.
550
a660d684
KB
551\membersection{wxGrid::SetGridCursor}\label{wxgridsetgridcursor}
552
553\func{void}{SetGridCursor}{\param{int }{row}, \param{int}{ col}}
554
555Sets the position of the selected cell.
556
557\membersection{wxGrid::SetLabelAlignment}\label{wxgridsetlabelalignment}
558
559\func{void}{SetLabelAlignment}{\param{int}{ orientation}, \param{int}{ alignment}}
560
561Sets the row or column label alignment. {\it orientation} should
562be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
563{\it alignment} should be wxCENTRE, wxLEFT or wxRIGHT.
564
565\membersection{wxGrid::SetLabelBackgroundColour}\label{wxgridsetlabelbackgroundcolour}
566
567\func{void}{SetLabelBackgroundColour}{\param{const wxColour\&}{ value}}
568
569Sets a row or column label background colour.
570
571\membersection{wxGrid::SetLabelSize}\label{wxgridsetlabelsize}
572
573\func{void}{SetLabelSize}{\param{int}{ orientation}, \param{int}{ size}}
574
575Sets the row label height, or column label width, in pixels. {\it orientation} should
576be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.
577
578If a dimension of zero is specified, the row or column labels will not be
579shown.
580
581\membersection{wxGrid::SetLabelTextColour}\label{wxgridsetlabeltextcolour}
582
583\func{void}{SetLabelTextColour}{\param{const wxColour\&}{ value}}
584
585Sets a row and column label text colour.
586
587\membersection{wxGrid::SetLabelTextFont}\label{wxgridsetlabeltextfont}
588
c0ed460c 589\func{void}{SetLabelTextFont}{\param{const wxFont\&}{ font}}
a660d684
KB
590
591Sets the font to be used for the row and column labels.
592
593\membersection{wxGrid::SetLabelValue}\label{wxgridsetlabelvalue}
594
595\func{void}{SetLabelValue}{\param{int}{ orientation}, \param{const wxString\&}{ value}, \param{int}{ pos}}
596
597Sets a row or column label value. {\it orientation} should
598be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
599{\it pos} is the label position.
600
601\membersection{wxGrid::SetRowHeight}\label{wxgridsetrowheight}
602
603\func{void}{SetRowHeight}{\param{int}{ row}, \param{int}{ height}}
604
605Sets the height in pixels for row {\it row}.
606
607\membersection{wxGrid::UpdateDimensions}\label{wxgridupdatedimensions}
608
609\func{void}{UpdateDimensions}{\void}
610
611Call this function whenever a change has been made via the API that
612might alter size characteristics. You may also need to follow it with
613a call to AdjustScrollbars.
614