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