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