1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 %% Modified by: Santiago Palacios
8 %% Copyright: (c) wxWidgets
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxGrid
}}\label{wxgrid
}
14 wxGrid and its related classes are used for displaying and editing tabular
15 data. They provide a rich set of features for display, editing, and
16 interacting with a variety of data sources. For simple applications, and to
17 help you get started, wxGrid is the only class you need to refer to
18 directly. It will set up default instances of the other classes and manage
19 them for you. For more complex applications you can derive your own
20 classes for custom grid views, grid data tables, cell editors and
21 renderers. The
\helpref{wxGrid classes overview
}{gridoverview
} has
22 examples of simple and more complex applications, explains the
23 relationship between the various grid classes and has a summary of the
24 keyboard shortcuts and mouse functions provided by wxGrid.
26 wxGrid has been greatly expanded and redesigned for wxWidgets
2.2
27 onwards. If you have been using the old wxGrid class you will probably
28 want to have a look at the
\helpref{wxGrid classes overview
}{gridoverview
} to see
29 how things have changed. The new grid classes are reasonably backward-compatible
30 but there are some exceptions. There are also easier ways of doing many things compared to
31 the previous implementation.
33 \wxheading{Derived from
}
35 \helpref{wxScrolledWindow
}{wxscrolledwindow
}\\
36 \helpref{wxPanel
}{wxpanel
}\\
37 \helpref{wxWindow
}{wxwindow
}\\
38 \helpref{wxEvtHandler
}{wxevthandler
}\\
39 \helpref{wxObject
}{wxobject
}
41 \wxheading{Include files
}
47 \helpref{wxAdv
}{librarieslist
}
49 \wxheading{Window styles
}
51 There are presently no specific window styles for wxGrid.
53 \wxheading{Event handling
}
57 The event handler for the following functions takes a
58 \helpref{wxGridSizeEvent
}{wxgridsizeevent
} parameter.
59 The ...
\_CMD\_... variants also take a window identifier.
62 \begin{twocollist
}\itemsep=
0pt
63 \twocolitem{{\bf EVT
\_GRID\_COL\_SIZE(func)
}}{The user resized a column by dragging it. Processes a wxEVT
\_GRID\_COL\_SIZE.
}
64 \twocolitem{{\bf EVT
\_GRID\_ROW\_SIZE(func)
}}{The user resized a row by dragging it. Processes a wxEVT
\_GRID\_ROW\_SIZE.
}
65 \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.
}
66 \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.
}
69 The event handler for the following functions takes a
70 \helpref{wxGridRangeSelectEvent
}{wxgridrangeselectevent
} parameter.
71 The ...
\_CMD\_... variant also takes a window identifier.
74 \begin{twocollist
}\itemsep=
0pt
75 \twocolitem{{\bf EVT
\_GRID\_RANGE\_SELECT(func)
}}{The user selected a group of contiguous cells. Processes a wxEVT
\_GRID\_RANGE\_SELECT.
}
76 \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.
}
79 The event handler for the following functions takes a
80 \helpref{wxGridEditorCreatedEvent
}{wxgrideditorcreatedevent
} parameter.
81 The ...
\_CMD\_... variant also takes a window identifier.
84 \begin{twocollist
}\itemsep=
0pt
85 \twocolitem{{\bf EVT
\_GRID\_EDITOR\_CREATED(func)
}}{The editor for a cell was created. Processes a wxEVT
\_GRID\_EDITOR\_CREATED.
}
86 \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.
}
91 \helpref{wxGrid overview
}{gridoverview
}
93 %%%%%%%%%%% FUNCTION GROUPS %%%%%%%%%%%%%
94 \latexignore{\rtfignore{\wxheading{Function groups
}}}
98 \membersection{Constructors and initialization
}\label{wxgridconstructors
}
100 \helpref{wxGrid
}{wxgridctor
}\\
101 \helpref{\destruct{wxGrid
}}{wxgriddtor
}\\
102 \helpref{CreateGrid
}{wxgridcreategrid
}\\
103 \helpref{SetTable
}{wxgridsettable
}
107 \membersection{Display format
}\label{wxgriddisplayformat
}
111 \membersection{Selection functions
}\label{wxgridselectionfunctions
}
113 \helpref{wxGrid::ClearSelection
}{wxgridclearselection
}\\
114 \helpref{wxGrid::IsSelection
}{wxgridisselection
}\\
115 \helpref{wxGrid::SelectAll
}{wxgridselectall
}\\
116 \helpref{wxGrid::SelectBlock
}{wxgridselectblock
}\\
117 \helpref{wxGrid::SelectCol
}{wxgridselectcol
}\\
118 \helpref{wxGrid::SelectRow
}{wxgridselectrow
}
120 %%%%%%%%% MEMBER FUNCTIONS %%%%%%%%%%
121 \helponly{\insertatlevel{2}{
129 \membersection{wxGrid::wxGrid
}\label{wxgridctor
}
131 \func{}{wxGrid
}{\void}
135 \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
}}
137 Constructor to create a grid object. Call either
\helpref{wxGrid::CreateGrid
}{wxgridcreategrid
} or
138 \helpref{wxGrid::SetTable
}{wxgridsettable
} directly after this to initialize the grid before using
143 \membersection{wxGrid::
\destruct{wxGrid
}}\label{wxgriddtor
}
145 \func{}{\destruct{wxGrid
}}{\void}
147 Destructor. This will also destroy the associated grid table unless you passed a table
148 object to the grid and specified that the grid should not take ownership of the
149 table (see
\helpref{wxGrid::SetTable
}{wxgridsettable
}).
153 \membersection{wxGrid::AppendCols
}\label{wxgridappendcols
}
155 \func{bool
}{AppendCols
}{\param{int
}{numCols =
1},
\param{bool
}{updateLabels = true
}}
157 Appends one or more new columns to the right of the grid and returns true if
158 successful. The updateLabels argument is not used at present.
160 If you are using a derived grid table class you will need to override
161 \helpref{wxGridTableBase::AppendCols
}{wxgridtablebaseappendcols
}. See
162 \helpref{wxGrid::InsertCols
}{wxgridinsertcols
} for further information.
166 \membersection{wxGrid::AppendRows
}\label{wxgridappendrows
}
168 \func{bool
}{AppendRows
}{\param{int
}{numRows =
1},
\param{bool
}{updateLabels = true
}}
170 Appends one or more new rows to the bottom of the grid and returns true if
171 successful. The updateLabels argument is not used at present.
173 If you are using a derived grid table class you will need to override
174 \helpref{wxGridTableBase::AppendRows
}{wxgridtablebaseappendrows
}. See
175 \helpref{wxGrid::InsertRows
}{wxgridinsertrows
} for further information.
179 \membersection{wxGrid::AutoSize
}\label{wxgridautosize
}
181 \func{void
}{AutoSize
}{\void}
183 Automatically sets the height and width of all rows and columns to fit their contents.
186 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
187 The memory requirements for this could become prohibitive if your grid is very large.
191 \membersection{wxGrid::AutoSizeColLabelSize
}\label{wxgridautosizecollabelsize
}
193 \func{void
}{AutoSizeColLabelSize
}{\param{int
}{col
}}
195 Automatically adjusts width of the column to fit its label.
199 \membersection{wxGrid::AutoSizeColumn
}\label{wxgridautosizecolumn
}
201 \func{void
}{AutoSizeColumn
}{\param{int
}{col
},
\param{bool
}{setAsMin = true
}}
203 Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will
204 also be set as the minimal width for the column.
207 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
208 The memory requirements for this could become prohibitive if your grid is very large.
212 \membersection{wxGrid::AutoSizeColumns
}\label{wxgridautosizecolumns
}
214 \func{void
}{AutoSizeColumns
}{\param{bool
}{setAsMin = true
}}
216 Automatically sizes all columns to fit their contents. If setAsMin is true the calculated widths will
217 also be set as the minimal widths for the columns.
220 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
221 The memory requirements for this could become prohibitive if your grid is very large.
225 \membersection{wxGrid::AutoSizeRow
}\label{wxgridautosizerow
}
227 \func{void
}{AutoSizeRow
}{\param{int
}{row
},
\param{bool
}{setAsMin = true
}}
229 Automatically sizes the row to fit its contents. If setAsMin is true the calculated height will
230 also be set as the minimal height for the row.
233 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
234 The memory requirements for this could become prohibitive if your grid is very large.
238 \membersection{wxGrid::AutoSizeRowLabelSize
}\label{wxgridautosizerowlabelsize
}
240 \func{void
}{AutoSizeRowLabelSize
}{\param{int
}{col
}}
242 Automatically adjusts height of the row to fit its label.
246 \membersection{wxGrid::AutoSizeRows
}\label{wxgridautosizerows
}
248 \func{void
}{AutoSizeRows
}{\param{bool
}{setAsMin = true
}}
250 Automatically sizes all rows to fit their contents. If setAsMin is true the calculated heights will
251 also be set as the minimal heights for the rows.
254 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
255 The memory requirements for this could become prohibitive if your grid is very large.
259 \membersection{wxGrid::BeginBatch
}\label{wxgridbeginbatch
}
261 \func{void
}{BeginBatch
}{\void}
263 Increments the grid's batch count. When the count is greater than zero repainting of
264 the grid is suppressed. Each call to BeginBatch must be matched by a later call to
265 \helpref{wxGrid::EndBatch
}{wxgridendbatch
}. Code that does a lot of grid
266 modification can be enclosed between BeginBatch and EndBatch calls to avoid
267 screen flicker. The final EndBatch will cause the grid to be repainted.
271 \helpref{wxGridUpdateLocker
}{wxgridupdatelocker
}
275 \membersection{wxGrid::BlockToDeviceRect
}\label{wxgridblocktodevicerect
}
277 \constfunc{wxRect
}{BlockToDeviceRect
}{\param{const wxGridCellCoords \&
}{topLeft
},
\param{const wxGridCellCoords \&
}{bottomRight
}}
279 This function returns the rectangle that encloses the block of cells
280 limited by TopLeft and BottomRight cell in device coords and clipped
281 to the client size of the grid window.
285 \membersection{wxGrid::CanDragColMove
}\label{wxgridcandragcolmove
}
287 \constfunc{bool
}{CanDragColMove
}{\void}
289 Returns true if columns can be moved by dragging with the mouse. Columns can be moved
290 by dragging on their labels.
294 \membersection{wxGrid::CanDragColSize
}\label{wxgridcandragcolsize
}
296 \constfunc{bool
}{CanDragColSize
}{\void}
298 Returns true if columns can be resized by dragging with the mouse. Columns can be resized
299 by dragging the edges of their labels. If grid line dragging is enabled they can also be
300 resized by dragging the right edge of the column in the grid cell area
301 (see
\helpref{wxGrid::EnableDragGridSize
}{wxgridenabledraggridsize
}).
305 \membersection{wxGrid::CanDragRowSize
}\label{wxgridcandragrowsize
}
307 \constfunc{bool
}{CanDragRowSize
}{\void}
309 Returns true if rows can be resized by dragging with the mouse. Rows can be resized
310 by dragging the edges of their labels. If grid line dragging is enabled they can also be
311 resized by dragging the lower edge of the row in the grid cell area
312 (see
\helpref{wxGrid::EnableDragGridSize
}{wxgridenabledraggridsize
}).
316 \membersection{wxGrid::CanDragGridSize
}\label{wxgridcandraggridsize
}
318 \constfunc{bool
}{CanDragGridSize
}{\void}
320 Return true if the dragging of grid lines to resize rows and columns is enabled or false otherwise.
324 \membersection{wxGrid::CanEnableCellControl
}\label{wxgridcanenablecellcontrol
}
326 \constfunc{bool
}{CanEnableCellControl
}{\void}
328 Returns true if the in-place edit control for the current grid cell can be used and
329 false otherwise (e.g. if the current cell is read-only).
333 \membersection{wxGrid::CanHaveAttributes
}\label{wxgridcanhaveattributes
}
335 \constfunc{bool
}{CanHaveAttributes
}{\void}
337 Do we have some place to store attributes in?
341 \membersection{wxGrid::CellToRect
}\label{wxgridcelltorect
}
343 \constfunc{wxRect
}{CellToRect
}{\param{int
}{row
},
\param{int
}{col
}}
345 \constfunc{wxRect
}{CellToRect
}{\param{const wxGridCellCoords\&
}{coords
}}
347 Return the rectangle corresponding to the grid cell's size and position in logical
352 \membersection{wxGrid::ClearGrid
}\label{wxgridcleargrid
}
354 \func{void
}{ClearGrid
}{\void}
356 Clears all data in the underlying grid table and repaints the grid. The table is not deleted by
357 this function. If you are using a derived table class then you need to override
358 \helpref{wxGridTableBase::Clear
}{wxgridtablebaseclear
} for this function to have any effect.
362 \membersection{wxGrid::ClearSelection
}\label{wxgridclearselection
}
364 \func{void
}{ClearSelection
}{\void}
366 Deselects all cells that are currently selected.
370 \membersection{wxGrid::CreateGrid
}\label{wxgridcreategrid
}
372 \func{bool
}{CreateGrid
}{\param{int
}{numRows
},
\param{int
}{numCols
},
\param{wxGrid::wxGridSelectionModes
}{selmode = wxGrid::wxGridSelectCells
}}
374 Creates a grid with the specified initial number of rows and columns.
375 Call this directly after the grid constructor. When you use this
376 function wxGrid will create and manage a simple table of string values
377 for you. All of the grid data will be stored in memory.
379 For applications with more complex data types or relationships, or for
380 dealing with very large datasets, you should derive your own grid table
381 class and pass a table object to the grid with
\helpref{wxGrid::SetTable
}{wxgridsettable
}.
385 \membersection{wxGrid::DeleteCols
}\label{wxgriddeletecols
}
387 \func{bool
}{DeleteCols
}{\param{int
}{pos =
0},
\param{int
}{numCols =
1},
\param{bool
}{updateLabels = true
}}
389 Deletes one or more columns from a grid starting at the specified position and returns
390 true if successful. The updateLabels argument is not used at present.
392 If you are using a derived grid table class you will need to override
393 \helpref{wxGridTableBase::DeleteCols
}{wxgridtablebasedeletecols
}. See
394 \helpref{wxGrid::InsertCols
}{wxgridinsertcols
} for further information.
398 \membersection{wxGrid::DeleteRows
}\label{wxgriddeleterows
}
400 \func{bool
}{DeleteRows
}{\param{int
}{pos =
0},
\param{int
}{numRows =
1},
\param{bool
}{updateLabels = true
}}
402 Deletes one or more rows from a grid starting at the specified position and returns
403 true if successful. The updateLabels argument is not used at present.
405 If you are using a derived grid table class you will need to override
406 \helpref{wxGridTableBase::DeleteRows
}{wxgridtablebasedeleterows
}. See
407 \helpref{wxGrid::InsertRows
}{wxgridinsertrows
} for further information.
411 \membersection{wxGrid::DisableCellEditControl
}\label{wxgriddisablecelleditcontrol
}
413 \func{void
}{DisableCellEditControl
}{\void}
415 Disables in-place editing of grid cells.
416 Equivalent to calling EnableCellEditControl(false).
420 \membersection{wxGrid::DisableDragColMove
}\label{wxgriddisabledragcolmove
}
422 \func{void
}{DisableDragColMove
}{\void}
424 Disables column moving by dragging with the mouse. Equivalent to passing false to
425 \helpref{wxGrid::EnableDragColMove
}{wxgridenabledragcolmove
}.
429 \membersection{wxGrid::DisableDragColSize
}\label{wxgriddisabledragcolsize
}
431 \func{void
}{DisableDragColSize
}{\void}
433 Disables column sizing by dragging with the mouse. Equivalent to passing false to
434 \helpref{wxGrid::EnableDragColSize
}{wxgridenabledragcolsize
}.
438 \membersection{wxGrid::DisableDragGridSize
}\label{wxgriddisabledraggridsize
}
440 \func{void
}{DisableDragGridSize
}{\void}
442 Disable mouse dragging of grid lines to resize rows and columns. Equivalent to passing
443 false to
\helpref{wxGrid::EnableDragGridSize
}{wxgridenabledraggridsize
}
447 \membersection{wxGrid::DisableDragRowSize
}\label{wxgriddisabledragrowsize
}
449 \func{void
}{DisableDragRowSize
}{\void}
451 Disables row sizing by dragging with the mouse. Equivalent to passing false to
452 \helpref{wxGrid::EnableDragRowSize
}{wxgridenabledragrowsize
}.
456 \membersection{wxGrid::EnableCellEditControl
}\label{wxgridenablecelleditcontrol
}
458 \func{void
}{EnableCellEditControl
}{\param{bool
}{enable = true
}}
460 Enables or disables in-place editing of grid cell data. The grid will issue either a
461 wxEVT
\_GRID\_EDITOR\_SHOWN or wxEVT
\_GRID\_EDITOR\_HIDDEN event.
465 \membersection{wxGrid::EnableDragColSize
}\label{wxgridenabledragcolsize
}
467 \func{void
}{EnableDragColSize
}{\param{bool
}{enable = true
}}
469 Enables or disables column sizing by dragging with the mouse.
473 \membersection{wxGrid::EnableDragColMove
}\label{wxgridenabledragcolmove
}
475 \func{void
}{EnableDragColMove
}{\param{bool
}{enable = true
}}
477 Enables or disables column moving by dragging with the mouse.
481 \membersection{wxGrid::EnableDragGridSize
}\label{wxgridenabledraggridsize
}
483 \func{void
}{EnableDragGridSize
}{\param{bool
}{enable = true
}}
485 Enables or disables row and column resizing by dragging gridlines with the mouse.
489 \membersection{wxGrid::EnableDragRowSize
}\label{wxgridenabledragrowsize
}
491 \func{void
}{EnableDragRowSize
}{\param{bool
}{enable = true
}}
493 Enables or disables row sizing by dragging with the mouse.
497 \membersection{wxGrid::EnableEditing
}\label{wxgridenableediting
}
499 \func{void
}{EnableEditing
}{\param{bool
}{edit
}}
501 If the edit argument is false this function sets the whole grid as read-only. If the
502 argument is true the grid is set to the default state where cells may be editable. In the
503 default state you can set single grid cells and whole rows and columns to be editable or
505 \helpref{wxGridCellAttribute::SetReadOnly
}{wxgridcellattrsetreadonly
}. For single
506 cells you can also use the shortcut function
507 \helpref{wxGrid::SetReadOnly
}{wxgridsetreadonly
}.
509 For more information about controlling grid cell attributes see the
510 \helpref{wxGridCellAttr
}{wxgridcellattr
} cell attribute class and the
511 \helpref{wxGrid classes overview
}{gridoverview
}.
515 \membersection{wxGrid::EnableGridLines
}\label{wxgridenablegridlines
}
517 \func{void
}{EnableGridLines
}{\param{bool
}{enable = true
}}
519 Turns the drawing of grid lines on or off.
523 \membersection{wxGrid::EndBatch
}\label{wxgridendbatch
}
525 \func{void
}{EndBatch
}{\void}
527 Decrements the grid's batch count. When the count is greater than zero repainting of
528 the grid is suppressed. Each previous call to
529 \helpref{wxGrid::BeginBatch
}{wxgridbeginbatch
} must be matched by a later call to
530 EndBatch. Code that does a lot of grid modification can be enclosed between
531 BeginBatch and EndBatch calls to avoid screen flicker. The final EndBatch will
532 cause the grid to be repainted.
536 \helpref{wxGridUpdateLocker
}{wxgridupdatelocker
}
540 \membersection{wxGrid::Fit
}\label{wxgridfit
}
542 \func{void
}{Fit
}{\void}
544 Overridden wxWindow method.
548 \membersection{wxGrid::ForceRefresh
}\label{wxgridforcerefresh
}
550 \func{void
}{ForceRefresh
}{\void}
552 Causes immediate repainting of the grid. Use this instead of the usual wxWindow::Refresh.
556 \membersection{wxGrid::GetBatchCount
}\label{wxgridgetbatchcount
}
558 \constfunc{int
}{GetBatchCount
}{\void}
560 Returns the number of times that
\helpref{wxGrid::BeginBatch
}{wxgridbeginbatch
} has been called
561 without (yet) matching calls to
\helpref{wxGrid::EndBatch
}{wxgridendbatch
}. While
562 the grid's batch count is greater than zero the display will not be updated.
566 \membersection{wxGrid::GetCellAlignment
}\label{wxgridgetcellalignment
}
568 \constfunc{void
}{GetCellAlignment
}{\param{int
}{row
},
\param{int
}{col
},
\param{int*
}{horiz
},
\param{int*
}{vert
}}
570 Sets the arguments to the horizontal and vertical text alignment values for the
571 grid cell at the specified location.
573 Horizontal alignment will be one of wxALIGN
\_LEFT, wxALIGN
\_CENTRE or wxALIGN
\_RIGHT. \\
574 Vertical alignment will be one of wxALIGN
\_TOP, wxALIGN
\_CENTRE or wxALIGN
\_BOTTOM.
576 \perlnote{This method only takes the parameters
{\tt row
} and
{\tt col
} and
577 returns a
2-element list
{\tt ( horiz, vert )
}.
}
581 \membersection{wxGrid::GetCellBackgroundColour
}\label{wxgridgetcellbackgroundcolour
}
583 \constfunc{wxColour
}{GetCellBackgroundColour
}{\param{int
}{row
},
\param{int
}{col
}}
585 Returns the background colour of the cell at the specified location.
589 \membersection{wxGrid::GetCellEditor
}\label{wxgridgetcelleditor
}
591 \constfunc{wxGridCellEditor*
}{GetCellEditor
}{\param{int
}{row
},
\param{int
}{col
}}
593 Returns a pointer to the editor for the cell at the specified location.
595 See
\helpref{wxGridCellEditor
}{wxgridcelleditor
} and
596 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
600 \membersection{wxGrid::GetCellFont
}\label{wxgridgetcellfont
}
602 \constfunc{wxFont
}{GetCellFont
}{\param{int
}{row
},
\param{int
}{col
}}
604 Returns the font for text in the grid cell at the specified location.
608 \membersection{wxGrid::GetCellRenderer
}\label{wxgridgetcellrenderer
}
610 \constfunc{wxGridCellRenderer*
}{GetCellRenderer
}{\param{int
}{row
},
\param{int
}{col
}}
612 Returns a pointer to the renderer for the grid cell at the specified location.
614 See
\helpref{wxGridCellRenderer
}{wxgridcellrenderer
} and
615 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
619 \membersection{wxGrid::GetCellTextColour
}\label{wxgridgetcelltextcolour
}
621 \constfunc{wxColour
}{GetCellTextColour
}{\param{int
}{row
},
\param{int
}{col
}}
623 Returns the text colour for the grid cell at the specified location.
627 \membersection{wxGrid::GetCellValue
}\label{wxgridgetcellvalue
}
629 \constfunc{wxString
}{GetCellValue
}{\param{int
}{row
},
\param{int
}{col
}}
631 \constfunc{wxString
}{GetCellValue
}{\param{const wxGridCellCoords\&
}{coords
}}
633 Returns the string contained in the cell at the specified location. For simple applications where a
634 grid object automatically uses a default grid table of string values you use this function together
635 with
\helpref{wxGrid::SetCellValue
}{wxgridsetcellvalue
} to access cell values.
637 For more complex applications where you have derived your own grid table class that contains
638 various data types (e.g. numeric, boolean or user-defined custom types) then you only use this
639 function for those cells that contain string values.
641 See
\helpref{wxGridTableBase::CanGetValueAs
}{wxgridtablebasecangetvalueas
}
642 and the
\helpref{wxGrid overview
}{gridoverview
} for more information.
646 \membersection{wxGrid::GetColAt
}\label{wxgridgetcolat
}
648 \constfunc{int
}{GetColAt
}{\param{int
}{colPos
}}
650 Returns the column ID of the specified column position.
653 \membersection{wxGrid::GetColLeft
}\label{wxgridgetcolleft
}
655 \constfunc{int
}{GetColLeft
}{\param{int
}{col
}}
659 \membersection{wxGrid::GetColLabelAlignment
}\label{wxgridgetcollabelalignment
}
661 \constfunc{void
}{GetColLabelAlignment
}{\param{int*
}{horiz
},
\param{int*
}{vert
}}
663 Sets the arguments to the current column label alignment values.
665 Horizontal alignment will be one of wxALIGN
\_LEFT, wxALIGN
\_CENTRE or wxALIGN
\_RIGHT.\\
666 Vertical alignment will be one of wxALIGN
\_TOP, wxALIGN
\_CENTRE or wxALIGN
\_BOTTOM.
668 \perlnote{This method takes no parameters and
669 returns a
2-element list
{\tt ( horiz, vert )
}.
}
673 \membersection{wxGrid::GetColLabelSize
}\label{wxgridgetcollabelsize
}
675 \constfunc{int
}{GetColLabelSize
}{\void}
677 Returns the current height of the column labels.
681 \membersection{wxGrid::GetColLabelValue
}\label{wxgridgetcollabelvalue
}
683 \constfunc{wxString
}{GetColLabelValue
}{\param{int
}{col
}}
685 Returns the specified column label. The default grid table class provides column labels of
686 the form A,B...Z,AA,AB...ZZ,AAA... If you are using a custom grid table you can override
687 \helpref{wxGridTableBase::GetColLabelValue
}{wxgridtablebasegetcollabelvalue
} to provide
692 \membersection{wxGrid::GetColMinimalAcceptableWidth
}\label{wxgridgetcolminimalacceptablewidth
}
694 \constfunc{int
}{GetColMinimalAcceptableWidth
}{}
696 This returns the value of the lowest column width that can be handled correctly. See
697 member
\helpref{SetColMinimalAcceptableWidth
}{wxgridsetcolminimalacceptablewidth
} for details.
701 \membersection{wxGrid::GetColMinimalWidth
}\label{wxgridgetcolminimalwidth
}
703 \constfunc{int
}{GetColMinimalWidth
}{\param{int
}{col
}}
705 Get the minimal width of the given column/row.
709 \membersection{wxGrid::GetColPos
}\label{wxgridgetcolpos
}
711 \constfunc{int
}{GetColPos
}{\param{int
}{colID
}}
713 Returns the position of the specified column.
717 \membersection{wxGrid::GetColRight
}\label{wxgridgetcolright
}
719 \constfunc{int
}{GetColRight
}{\param{int
}{col
}}
723 \membersection{wxGrid::GetColSize
}\label{wxgridgetcolsize
}
725 \constfunc{int
}{GetColSize
}{\param{int
}{col
}}
727 Returns the width of the specified column.
731 \membersection{wxGrid::GetDefaultCellAlignment
}\label{wxgridgetdefaultcellalignment
}
733 \constfunc{void
}{GetDefaultCellAlignment
}{\param{int*
}{horiz
},
\param{int*
}{vert
}}
735 Sets the arguments to the current default horizontal and vertical text alignment
738 Horizontal alignment will be one of wxALIGN
\_LEFT, wxALIGN
\_CENTRE or wxALIGN
\_RIGHT. \\
739 Vertical alignment will be one of wxALIGN
\_TOP, wxALIGN
\_CENTRE or wxALIGN
\_BOTTOM.
743 \membersection{wxGrid::GetDefaultCellBackgroundColour
}\label{wxgridgetdefaultcellbackgroundcolour
}
745 \constfunc{wxColour
}{GetDefaultCellBackgroundColour
}{\void}
747 Returns the current default background colour for grid cells.
751 \membersection{wxGrid::GetDefaultCellFont
}\label{wxgridgetdefaultcellfont
}
753 \constfunc{wxFont
}{GetDefaultCellFont
}{\void}
755 Returns the current default font for grid cell text.
759 \membersection{wxGrid::GetDefaultCellTextColour
}\label{wxgridgetdefaultcelltextcolour
}
761 \constfunc{wxColour
}{GetDefaultCellTextColour
}{\void}
763 Returns the current default colour for grid cell text.
767 \membersection{wxGrid::GetDefaultColLabelSize
}\label{wxgridgetdefaultcollabelsize
}
769 \constfunc{int
}{GetDefaultColLabelSize
}{\void}
771 Returns the default height for column labels.
775 \membersection{wxGrid::GetDefaultColSize
}\label{wxgridgetdefaultcolsize
}
777 \constfunc{int
}{GetDefaultColSize
}{\void}
779 Returns the current default width for grid columns.
783 \membersection{wxGrid::GetDefaultEditor
}\label{wxgridgetdefaulteditor
}
785 \constfunc{wxGridCellEditor*
}{GetDefaultEditor
}{\void}
787 Returns a pointer to the current default grid cell editor.
789 See
\helpref{wxGridCellEditor
}{wxgridcelleditor
} and
790 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
794 \membersection{wxGrid::GetDefaultEditorForCell
}\label{wxgridgetdefaulteditorforcell
}
796 \constfunc{wxGridCellEditor*
}{GetDefaultEditorForCell
}{\param{int
}{row
},
\param{int
}{col
}}
798 \constfunc{wxGridCellEditor*
}{GetDefaultEditorForCell
}{\param{const wxGridCellCoords\&
}{c
}}
802 \membersection{wxGrid::GetDefaultEditorForType
}\label{wxgridgetdefaulteditorfortype
}
804 \constfunc{wxGridCellEditor*
}{GetDefaultEditorForType
}{\param{const wxString\&
}{typeName
}}
808 \membersection{wxGrid::GetDefaultRenderer
}\label{wxgridgetdefaultrenderer
}
810 \constfunc{wxGridCellRenderer*
}{GetDefaultRenderer
}{\void}
812 Returns a pointer to the current default grid cell renderer.
814 See
\helpref{wxGridCellRenderer
}{wxgridcellrenderer
} and
815 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
819 \membersection{wxGrid::GetDefaultRendererForCell
}\label{wxgridgetdefaultrendererforcell
}
821 \constfunc{wxGridCellRenderer*
}{GetDefaultRendererForCell
}{\param{int
}{row
},
\param{int
}{col
}}
825 \membersection{wxGrid::GetDefaultRendererForType
}\label{wxgridgetdefaultrendererfortype
}
827 \constfunc{wxGridCellRenderer*
}{GetDefaultRendererForType
}{\param{const wxString\&
}{typeName
}}
831 \membersection{wxGrid::GetDefaultRowLabelSize
}\label{wxgridgetdefaultrowlabelsize
}
833 \constfunc{int
}{GetDefaultRowLabelSize
}{\void}
835 Returns the default width for the row labels.
839 \membersection{wxGrid::GetDefaultRowSize
}\label{wxgridgetdefaultrowsize
}
841 \constfunc{int
}{GetDefaultRowSize
}{\void}
843 Returns the current default height for grid rows.
847 \membersection{wxGrid::GetGridCursorCol
}\label{wxgridgetgridcursorcol
}
849 \constfunc{int
}{GetGridCursorCol
}{\void}
851 Returns the current grid cell column position.
855 \membersection{wxGrid::GetGridCursorRow
}\label{wxgridgetgridcursorrow
}
857 \constfunc{int
}{GetGridCursorRow
}{\void}
859 Returns the current grid cell row position.
863 \membersection{wxGrid::GetGridLineColour
}\label{wxgridgetgridlinecolour
}
865 \constfunc{wxColour
}{GetGridLineColour
}{\void}
867 Returns the colour used for grid lines.
871 \helpref{GetDefaultGridLinePen()
}{wxgridgetdefaultgridlinepen
}
874 \membersection{wxGrid::GetDefaultGridLinePen
}\label{wxgridgetdefaultgridlinepen
}
876 \func{wxPen
}{GetDefaultGridLinePen
}{\void}
878 Returns the pen used for grid lines. This virtual function may be overridden in
879 derived classes in order to change the appearance of grid lines. Note that
880 currently the pen width must be $
1$.
884 \helpref{GetColGridLinePen()
}{wxgridgetcolgridlinepen
},\\
885 \helpref{GetRowGridLinePen()
}{wxgridgetrowgridlinepen
}
890 \membersection{wxGrid::GetRowGridLinePen
}\label{wxgridgetrowgridlinepen
}
892 \func{wxPen
}{GetRowGridLinePen
}{\param{int
}{row
}}
894 Returns the pen used for horizontal grid lines. This virtual function may be
895 overridden in derived classes in order to change the appearance of individual
896 grid line for the given row
\arg{row
}.
901 // in a grid displaying music notation, use a solid black pen between
902 // octaves (C0=row
127, C1=row
115 etc.)
903 wxPen MidiGrid::GetRowGridLinePen(int row)
906 return wxPen
(*wxBLACK, 1, wxSOLID);
908 return GetDefaultGridLinePen();
914 \membersection{wxGrid::GetColGridLinePen}\label{wxgridgetcolgridlinepen}
916 \func{wxPen}{GetColGridLinePen}{\param{int }{col}}
918 Returns the pen used for vertical grid lines. This virtual function may be
919 overridden in derived classes in order to change the appearance of individual
920 grid lines for the given column \arg{col}.
922 See \helpref{GetRowGridLinePen()}{wxgridgetrowgridlinepen} for an example.
927 \membersection{wxGrid::GridLinesEnabled}\label{wxgridgridlinesenabled}
929 \constfunc{bool}{GridLinesEnabled}{\void}
931 Returns true if drawing of grid lines is turned on, false otherwise.
935 \membersection{wxGrid::GetLabelBackgroundColour}\label{wxgridgetlabelbackgroundcolour}
937 \constfunc{wxColour}{GetLabelBackgroundColour}{\void}
939 Returns the colour used for the background of row and column labels.
943 \membersection{wxGrid::GetLabelFont}\label{wxgridgetlabelfont}
945 \constfunc{wxFont}{GetLabelFont}{\void}
947 Returns the font used for row and column labels.
951 \membersection{wxGrid::GetLabelTextColour}\label{wxgridgetlabeltextcolour}
953 \constfunc{wxColour}{GetLabelTextColour}{\void}
955 Returns the colour used for row and column label text.
959 \membersection{wxGrid::GetNumberCols}\label{wxgridgetnumbercols}
961 \constfunc{int}{GetNumberCols}{\void}
963 Returns the total number of grid columns (actually the number of columns in the underlying grid
968 \membersection{wxGrid::GetNumberRows}\label{wxgridgetnumberrows}
970 \constfunc{int}{GetNumberRows}{\void}
972 Returns the total number of grid rows (actually the number of rows in the underlying grid table).
976 \membersection{wxGrid::GetOrCreateCellAttr}\label{wxgridgetorcreatecellattr}
978 \constfunc{wxGridCellAttr*}{GetOrCreateCellAttr}{\param{int }{row}, \param{int }{col}}
982 \membersection{wxGrid::GetRowMinimalAcceptableHeight}\label{wxgridgetrowminimalacceptableheight}
984 \constfunc{int}{GetRowMinimalAcceptableHeight}{}
986 This returns the value of the lowest row width that can be handled correctly. See
987 member \helpref{SetRowMinimalAcceptableHeight}{wxgridsetrowminimalacceptableheight} for details.
991 \membersection{wxGrid::GetRowMinimalHeight}\label{wxgridgetrowminimalheight}
993 \constfunc{int}{GetRowMinimalHeight}{\param{int }{col}}
997 \membersection{wxGrid::GetRowLabelAlignment}\label{wxgridgetrowlabelalignment}
999 \constfunc{void}{GetRowLabelAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
1001 Sets the arguments to the current row label alignment values.
1003 Horizontal alignment will be one of wxLEFT, wxCENTRE or wxRIGHT. \\
1004 Vertical alignment will be one of wxTOP, wxCENTRE or wxBOTTOM.
1006 \perlnote{This method takes no parameters and
1007 returns a 2-element list {\tt ( horiz, vert )}.}
1011 \membersection{wxGrid::GetRowLabelSize}\label{wxgridgetrowlabelsize}
1013 \constfunc{int}{GetRowLabelSize}{\void}
1015 Returns the current width of the row labels.
1019 \membersection{wxGrid::GetRowLabelValue}\label{wxgridgetrowlabelvalue}
1021 \constfunc{wxString}{GetRowLabelValue}{\param{int }{row}}
1023 Returns the specified row label. The default grid table class provides numeric row labels.
1024 If you are using a custom grid table you can override
1025 \helpref{wxGridTableBase::GetRowLabelValue}{wxgridtablebasegetcollabelvalue} to provide
1030 \membersection{wxGrid::GetRowSize}\label{wxgridgetrowsize}
1032 \constfunc{int}{GetRowSize}{\param{int }{row}}
1034 Returns the height of the specified row.
1038 \membersection{wxGrid::GetScrollLineX}\label{wxgridgetscrolllinex}
1040 \constfunc{int}{GetScrollLineX}{\void}
1042 Returns the number of pixels per horizontal scroll increment. The default is 15.
1044 \wxheading{See also}
1046 \helpref{wxGrid::GetScrollLineY}{wxgridgetscrollliney},\rtfsp
1047 \helpref{wxGrid::SetScrollLineX}{wxgridsetscrolllinex},\rtfsp
1048 \helpref{wxGrid::SetScrollLineY}{wxgridsetscrollliney}
1052 \membersection{wxGrid::GetScrollLineY}\label{wxgridgetscrollliney}
1054 \constfunc{int}{GetScrollLineY}{\void}
1056 Returns the number of pixels per vertical scroll increment. The default is 15.
1058 \wxheading{See also}
1060 \helpref{wxGrid::GetScrollLineX}{wxgridgetscrolllinex},\rtfsp
1061 \helpref{wxGrid::SetScrollLineX}{wxgridsetscrolllinex},\rtfsp
1062 \helpref{wxGrid::SetScrollLineY}{wxgridsetscrollliney}
1066 \membersection{wxGrid::GetSelectionMode}\label{wxgridgetselectionmode}
1068 \constfunc{wxGrid::wxGridSelectionModes}{GetSelectionMode}{\void}
1070 Returns the current selection mode, see \helpref{wxGrid::SetSelectionMode}{wxgridsetselectionmode}.
1074 \membersection{wxGrid::GetSelectedCells}\label{wxgridgetselectedcells}
1076 \constfunc{wxGridCellCoordsArray}{GetSelectedCells}{\void}
1078 Returns an array of singly selected cells.
1082 \membersection{wxGrid::GetSelectedCols}\label{wxgridgetselectedcols}
1084 \constfunc{wxArrayInt}{GetSelectedCols}{\void}
1086 Returns an array of selected cols.
1090 \membersection{wxGrid::GetSelectedRows}\label{wxgridgetselectedrows}
1092 \constfunc{wxArrayInt}{GetSelectedRows}{\void}
1094 Returns an array of selected rows.
1098 \membersection{wxGrid::GetSelectionBackground}\label{wxgridgetselectionbackground}
1100 \constfunc{wxColour}{GetSelectionBackground}{\void}
1102 Access or update the selection fore/back colours
1106 \membersection{wxGrid::GetSelectionBlockTopLeft}\label{wxgridgetselectionblocktopleft}
1108 \constfunc{wxGridCellCoordsArray}{GetSelectionBlockTopLeft}{\void}
1110 Returns an array of the top left corners of blocks of selected cells,
1111 see \helpref{wxGrid::GetSelectionBlockBottomRight}{wxgridgetselectionblockbottomright}.
1115 \membersection{wxGrid::GetSelectionBlockBottomRight}\label{wxgridgetselectionblockbottomright}
1117 \constfunc{wxGridCellCoordsArray}{GetSelectionBlockBottomRight}{\void}
1119 Returns an array of the bottom right corners of blocks of selected cells,
1120 see \helpref{wxGrid::GetSelectionBlockTopLeft}{wxgridgetselectionblocktopleft}.
1124 \membersection{wxGrid::GetSelectionForeground}\label{wxgridgetselectionforeground}
1126 \constfunc{wxColour}{GetSelectionForeground}{\void}
1130 \membersection{wxGrid::GetTable}\label{wxgridgettable}
1132 \constfunc{wxGridTableBase *}{GetTable}{\void}
1134 Returns a base pointer to the current table object.
1138 \membersection{wxGrid::GetViewWidth}\label{wxgridgetviewwidth}
1140 \constfunc{int}{GetViewWidth}{\void}
1142 Returned number of whole cols visible.
1146 \membersection{wxGrid::HideCellEditControl}\label{wxgridhidecelleditcontrol}
1148 \func{void}{HideCellEditControl}{\void}
1150 Hides the in-place cell edit control.
1154 \membersection{wxGrid::InitColWidths}\label{wxgridinitcolwidths}
1156 \func{void}{InitColWidths}{\void}
1158 Init the m\_colWidths/Rights arrays
1162 \membersection{wxGrid::InitRowHeights}\label{wxgridinitrowheights}
1164 \func{void}{InitRowHeights}{\void}
1166 NB: {\it never} access m\_row/col arrays directly because they are created
1167 on demand, {\it always} use accessor functions instead!
1169 Init the m\_rowHeights/Bottoms arrays with default values.
1173 \membersection{wxGrid::InsertCols}\label{wxgridinsertcols}
1175 \func{bool}{InsertCols}{\param{int }{pos = 0}, \param{int }{numCols = 1}, \param{bool }{updateLabels = true}}
1177 Inserts one or more new columns into a grid with the first new column at the
1178 specified position and returns true if successful. The updateLabels argument is not
1181 The sequence of actions begins with the grid object requesting the underlying grid
1182 table to insert new columns. If this is successful the table notifies the grid and the
1183 grid updates the display. For a default grid (one where you have called
1184 \helpref{wxGrid::CreateGrid}{wxgridcreategrid}) this process is automatic. If you are
1185 using a custom grid table (specified with \helpref{wxGrid::SetTable}{wxgridsettable})
1186 then you must override
1187 \helpref{wxGridTableBase::InsertCols}{wxgridtablebaseinsertcols} in your derived
1192 \membersection{wxGrid::InsertRows}\label{wxgridinsertrows}
1194 \func{bool}{InsertRows}{\param{int }{pos = 0}, \param{int }{numRows = 1}, \param{bool }{updateLabels = true}}
1196 Inserts one or more new rows into a grid with the first new row at the specified
1197 position and returns true if successful. The updateLabels argument is not used at
1200 The sequence of actions begins with the grid object requesting the underlying grid
1201 table to insert new rows. If this is successful the table notifies the grid and the
1202 grid updates the display. For a default grid (one where you have called
1203 \helpref{wxGrid::CreateGrid}{wxgridcreategrid}) this process is automatic. If you are
1204 using a custom grid table (specified with \helpref{wxGrid::SetTable}{wxgridsettable})
1205 then you must override
1206 \helpref{wxGridTableBase::InsertRows}{wxgridtablebaseinsertrows} in your derived
1211 \membersection{wxGrid::IsCellEditControlEnabled}\label{wxgridiscelleditcontrolenabled}
1213 \constfunc{bool}{IsCellEditControlEnabled}{\void}
1215 Returns true if the in-place edit control is currently enabled.
1219 \membersection{wxGrid::IsCurrentCellReadOnly}\label{wxgridiscurrentcellreadonly}
1221 \constfunc{bool}{IsCurrentCellReadOnly}{\void}
1223 Returns true if the current cell has been set to read-only
1224 (see \helpref{wxGrid::SetReadOnly}{wxgridsetreadonly}).
1228 \membersection{wxGrid::IsEditable}\label{wxgridiseditable}
1230 \constfunc{bool}{IsEditable}{\void}
1232 Returns false if the whole grid has been set as read-only or true otherwise.
1233 See \helpref{wxGrid::EnableEditing}{wxgridenableediting} for more information about
1234 controlling the editing status of grid cells.
1238 \membersection{wxGrid::IsInSelection}\label{wxgridisinselection}
1240 \constfunc{bool}{IsInSelection}{\param{int }{row}, \param{int }{col}}
1242 \constfunc{bool}{IsInSelection}{\param{const wxGridCellCoords\& }{coords}}
1244 Is this cell currently selected.
1248 \membersection{wxGrid::IsReadOnly}\label{wxgridisreadonly}
1250 \constfunc{bool}{IsReadOnly}{\param{int }{row}, \param{int }{col}}
1252 Returns true if the cell at the specified location can't be edited.
1253 See also \helpref{wxGrid::IsReadOnly}{wxgridisreadonly}.
1257 \membersection{wxGrid::IsSelection}\label{wxgridisselection}
1259 \constfunc{bool}{IsSelection}{\void}
1261 Returns true if there are currently rows, columns or blocks of cells selected.
1265 \membersection{wxGrid::IsVisible}\label{wxgridisvisible}
1267 \constfunc{bool}{IsVisible}{\param{int }{row}, \param{int }{col}, \param{bool }{wholeCellVisible = true}}
1269 \constfunc{bool}{IsVisible}{\param{const wxGridCellCoords\& }{coords}, \param{bool }{wholeCellVisible = true}}
1271 Returns true if a cell is either wholly visible (the default) or at least partially
1272 visible in the grid window.
1276 \membersection{wxGrid::MakeCellVisible}\label{wxgridmakecellvisible}
1278 \func{void}{MakeCellVisible}{\param{int }{row}, \param{int }{col}}
1280 \func{void}{MakeCellVisible}{\param{const wxGridCellCoords\& }{coords}}
1282 Brings the specified cell into the visible grid cell area with minimal scrolling. Does
1283 nothing if the cell is already visible.
1287 \membersection{wxGrid::MoveCursorDown}\label{wxgridmovecursordown}
1289 \func{bool}{MoveCursorDown}{\param{bool }{expandSelection}}
1291 Moves the grid cursor down by one row. If a block of cells was previously selected it
1292 will expand if the argument is true or be cleared if the argument is false.
1294 \wxheading{Keyboard}\\
1295 This function is called for Down cursor key presses or Shift+Down to expand a selection.
1299 \membersection{wxGrid::MoveCursorLeft}\label{wxgridmovecursorleft}
1301 \func{bool}{MoveCursorLeft}{\param{bool }{expandSelection}}
1303 Moves the grid cursor left by one column. If a block of cells was previously selected it
1304 will expand if the argument is true or be cleared if the argument is false.
1306 \wxheading{Keyboard}\\
1307 This function is called for Left cursor key presses or Shift+Left to expand a selection.
1311 \membersection{wxGrid::MoveCursorRight}\label{wxgridmovecursorright}
1313 \func{bool}{MoveCursorRight}{\param{bool }{expandSelection}}
1315 Moves the grid cursor right by one column. If a block of cells was previously selected it
1316 will expand if the argument is true or be cleared if the argument is false.
1318 \wxheading{Keyboard}\\
1319 This function is called for Right cursor key presses or Shift+Right to expand a selection.
1323 \membersection{wxGrid::MoveCursorUp}\label{wxgridmovecursorup}
1325 \func{bool}{MoveCursorUp}{\param{bool }{expandSelection}}
1327 Moves the grid cursor up by one row. If a block of cells was previously selected it
1328 will expand if the argument is true or be cleared if the argument is false.
1330 \wxheading{Keyboard}\\
1331 This function is called for Up cursor key presses or Shift+Up to expand a selection.
1335 \membersection{wxGrid::MoveCursorDownBlock}\label{wxgridmovecursordownblock}
1337 \func{bool}{MoveCursorDownBlock}{\param{bool }{expandSelection}}
1339 Moves the grid cursor down in the current column such that it skips to the beginning or
1340 end of a block of non-empty cells. If a block of cells was previously selected it
1341 will expand if the argument is true or be cleared if the argument is false.
1343 \wxheading{Keyboard}\\
1344 This function is called for the Ctrl+Down key combination. Shift+Ctrl+Down expands a selection.
1348 \membersection{wxGrid::MoveCursorLeftBlock}\label{wxgridmovecursorleftblock}
1350 \func{bool}{MoveCursorLeftBlock}{\param{bool }{expandSelection}}
1352 Moves the grid cursor left in the current row such that it skips to the beginning or
1353 end of a block of non-empty cells. If a block of cells was previously selected it
1354 will expand if the argument is true or be cleared if the argument is false.
1356 \wxheading{Keyboard}\\
1357 This function is called for the Ctrl+Left key combination. Shift+Ctrl+left expands a selection.
1361 \membersection{wxGrid::MoveCursorRightBlock}\label{wxgridmovecursorrightblock}
1363 \func{bool}{MoveCursorRightBlock}{\param{bool }{expandSelection}}
1365 Moves the grid cursor right in the current row such that it skips to the beginning or
1366 end of a block of non-empty cells. If a block of cells was previously selected it
1367 will expand if the argument is true or be cleared if the argument is false.
1369 \wxheading{Keyboard}\\
1370 This function is called for the Ctrl+Right key combination. Shift+Ctrl+Right expands a selection.
1374 \membersection{wxGrid::MoveCursorUpBlock}\label{wxgridmovecursorupblock}
1376 \func{bool}{MoveCursorUpBlock}{\param{bool }{expandSelection}}
1378 Moves the grid cursor up in the current column such that it skips to the beginning or
1379 end of a block of non-empty cells. If a block of cells was previously selected it
1380 will expand if the argument is true or be cleared if the argument is false.
1382 \wxheading{Keyboard}\\
1383 This function is called for the Ctrl+Up key combination. Shift+Ctrl+Up expands a selection.
1387 \membersection{wxGrid::MovePageDown}\label{wxgridmovepagedown}
1389 \func{bool}{MovePageDown}{\void}
1391 Moves the grid cursor down by some number of rows so that the previous bottom visible row
1392 becomes the top visible row.
1394 \wxheading{Keyboard}\\
1395 This function is called for PgDn keypresses.
1399 \membersection{wxGrid::MovePageUp}\label{wxgridmovepageup}
1401 \func{bool}{MovePageUp}{\void}
1403 Moves the grid cursor up by some number of rows so that the previous top visible row
1404 becomes the bottom visible row.
1406 \wxheading{Keyboard}\\
1407 This function is called for PgUp keypresses.
1411 \membersection{wxGrid::RegisterDataType}\label{wxgridregisterdatatype}
1413 \func{void}{RegisterDataType}{\param{const wxString\& }{typeName}, \param{wxGridCellRenderer* }{renderer}, \param{wxGridCellEditor* }{editor}}
1415 Methods for a registry for mapping data types to Renderers/Editors
1419 \membersection{wxGrid::SaveEditControlValue}\label{wxgridsaveeditcontrolvalue}
1421 \func{void}{SaveEditControlValue}{\void}
1423 Sets the value of the current grid cell to the current in-place edit control value.
1424 This is called automatically when the grid cursor moves from the current cell to a
1425 new cell. It is also a good idea to call this function when closing a grid since
1426 any edits to the final cell location will not be saved otherwise.
1430 \membersection{wxGrid::SelectAll}\label{wxgridselectall}
1432 \func{void}{SelectAll}{\void}
1434 Selects all cells in the grid.
1438 \membersection{wxGrid::SelectBlock}\label{wxgridselectblock}
1440 \func{void}{SelectBlock}{\param{int }{topRow}, \param{int }{leftCol},
1441 \param{int }{bottomRow}, \param{int }{rightCol}, \param{bool }{addToSelected = false}}
1443 \func{void}{SelectBlock}{\param{const wxGridCellCoords\& }{topLeft},
1444 \param{const wxGridCellCoords\& }{bottomRight}, \param{bool }{addToSelected = false}}
1446 Selects a rectangular block of cells. If addToSelected is false then any existing selection will be
1447 deselected; if true the column will be added to the existing selection.
1451 \membersection{wxGrid::SelectCol}\label{wxgridselectcol}
1453 \func{void}{SelectCol}{\param{int }{col}, \param{bool }{addToSelected = false}}
1455 Selects the specified column. If addToSelected is false then any existing selection will be
1456 deselected; if true the column will be added to the existing selection.
1460 \membersection{wxGrid::SelectionToDeviceRect}\label{wxgridselectiontodevicerect}
1462 \constfunc{wxRect}{SelectionToDeviceRect}{\void}
1464 This function returns the rectangle that encloses the selected cells
1465 in device coords and clipped to the client size of the grid window.
1469 \membersection{wxGrid::SelectRow}\label{wxgridselectrow}
1471 \func{void}{SelectRow}{\param{int }{row}, \param{bool }{addToSelected = false}}
1473 Selects the specified row. If addToSelected is false then any existing selection will be
1474 deselected; if true the row will be added to the existing selection.
1478 \membersection{wxGrid::SetCellAlignment}\label{wxgridsetcellalignment}
1480 \func{void}{SetCellAlignment}{\param{int }{row}, \param{int }{col}, \param{int }{horiz}, \param{int }{vert}}
1482 \func{void}{SetCellAlignment}{\param{int }{align}, \param{int }{row}, \param{int }{col}}
1484 Sets the horizontal and vertical alignment for grid cell text at the specified location.
1486 Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT. \\
1487 Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM.
1491 \membersection{wxGrid::SetCellBackgroundColour}\label{wxgridsetcellbackgroundcolour}
1493 \func{void}{SetCellBackgroundColour}{\param{int }{row}, \param{int }{col}, \param{const wxColour\&}{ colour}}
1497 \membersection{wxGrid::SetCellEditor}\label{wxgridsetcelleditor}
1499 \func{void}{SetCellEditor}{\param{int }{row}, \param{int }{col}, \param{wxGridCellEditor* }{editor}}
1501 Sets the editor for the grid cell at the specified location.
1502 The grid will take ownership of the pointer.
1504 See \helpref{wxGridCellEditor}{wxgridcelleditor} and
1505 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
1509 \membersection{wxGrid::SetCellFont}\label{wxgridsetcellfont}
1511 \func{void}{SetCellFont}{\param{int }{row}, \param{int }{col}, \param{const wxFont\&}{ font}}
1513 Sets the font for text in the grid cell at the specified location.
1517 \membersection{wxGrid::SetCellRenderer}\label{wxgridsetcellrenderer}
1519 \func{void}{SetCellRenderer}{\param{int }{row}, \param{int }{col}, \param{wxGridCellRenderer* }{renderer}}
1521 Sets the renderer for the grid cell at the specified location.
1522 The grid will take ownership of the pointer.
1524 See \helpref{wxGridCellRenderer}{wxgridcellrenderer} and
1525 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
1529 \membersection{wxGrid::SetCellTextColour}\label{wxgridsetcelltextcolour}
1531 \func{void}{SetCellTextColour}{\param{int }{row}, \param{int }{col}, \param{const wxColour\&}{ colour}}
1533 \func{void}{SetCellTextColour}{\param{const wxColour\& }{val}, \param{int }{row}, \param{int }{col}}
1535 \func{void}{SetCellTextColour}{\param{const wxColour\& }{colour}}
1537 Sets the text colour for the grid cell at the specified location.
1541 \membersection{wxGrid::SetCellValue}\label{wxgridsetcellvalue}
1543 \func{void}{SetCellValue}{\param{int }{row}, \param{int }{col}, \param{const wxString\& }{s}}
1545 \func{void}{SetCellValue}{\param{const wxGridCellCoords\& }{coords}, \param{const wxString\& }{s}}
1547 \func{void}{SetCellValue}{\param{const wxString\& }{val}, \param{int }{row}, \param{int }{col}}
1549 Sets the string value for the cell at the specified location. For simple applications where a
1550 grid object automatically uses a default grid table of string values you use this function together
1551 with \helpref{wxGrid::GetCellValue}{wxgridgetcellvalue} to access cell values.
1553 For more complex applications where you have derived your own grid table class that contains
1554 various data types (e.g. numeric, boolean or user-defined custom types) then you only use this
1555 function for those cells that contain string values.
1557 The last form is for backward compatibility only.
1559 See \helpref{wxGridTableBase::CanSetValueAs}{wxgridtablebasecangetvalueas}
1560 and the \helpref{wxGrid overview}{gridoverview} for more information.
1564 \membersection{wxGrid::SetColAttr}\label{wxgridsetcolattr}
1566 \func{void}{SetColAttr}{\param{int }{col}, \param{wxGridCellAttr* }{attr}}
1568 Sets the cell attributes for all cells in the specified column.
1570 For more information about controlling grid cell attributes see the
1571 \helpref{wxGridCellAttr}{wxgridcellattr} cell attribute class and the
1572 \helpref{wxGrid classes overview}{gridoverview}.
1576 \membersection{wxGrid::SetColFormatBool}\label{wxgridsetcolformatbool}
1578 \func{void}{SetColFormatBool}{\param{int }{col}}
1580 Sets the specified column to display boolean values. wxGrid displays boolean values with a checkbox.
1584 \membersection{wxGrid::SetColFormatNumber}\label{wxgridsetcolformatnumber}
1586 \func{void}{SetColFormatNumber}{\param{int }{col}}
1588 Sets the specified column to display integer values.
1592 \membersection{wxGrid::SetColFormatFloat}\label{wxgridsetcolformatfloat}
1594 \func{void}{SetColFormatFloat}{\param{int }{col}, \param{int }{width = -1}, \param{int }{precision = -1}}
1596 Sets the specified column to display floating point values with the given width and precision.
1600 \membersection{wxGrid::SetColFormatCustom}\label{wxgridsetcolformatcustom}
1602 \func{void}{SetColFormatCustom}{\param{int }{col}, \param{const wxString\& }{typeName}}
1604 Sets the specified column to display data in a custom format.
1605 See the \helpref{wxGrid overview}{gridoverview} for more information on working
1606 with custom data types.
1610 \membersection{wxGrid::SetColLabelAlignment}\label{wxgridsetcollabelalignment}
1612 \func{void}{SetColLabelAlignment}{\param{int }{horiz}, \param{int }{vert}}
1614 Sets the horizontal and vertical alignment of column label text.
1616 Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT.
1618 Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM.
1622 \membersection{wxGrid::SetColLabelSize}\label{wxgridsetcollabelsize}
1624 \func{void}{SetColLabelSize}{\param{int }{height}}
1626 Sets the height of the column labels.
1628 If \arg{height} equals to \texttt{wxGRID\_AUTOSIZE} then height is calculated automatically
1629 so that no label is truncated. Note that this could be slow for a large table.
1633 \membersection{wxGrid::SetColLabelValue}\label{wxgridsetcollabelvalue}
1635 \func{void}{SetColLabelValue}{\param{int }{col}, \param{const wxString\&}{ value}}
1637 Set the value for the given column label. If you are using a derived grid table you must
1638 override \helpref{wxGridTableBase::SetColLabelValue}{wxgridtablebasesetcollabelvalue}
1639 for this to have any effect.
1643 \membersection{wxGrid::SetColMinimalWidth}\label{wxgridsetcolminimalwidth}
1645 \func{void}{SetColMinimalWidth}{\param{int }{col}, \param{int }{width}}
1647 Sets the minimal width for the specified column. This should normally be called when creating the grid
1648 because it will not resize a column that is already narrower than the minimal width.
1649 The width argument must be higher than the minimimal acceptable column width, see
1650 \helpref{wxGrid::GetColMinimalAcceptableWidth}{wxgridgetcolminimalacceptablewidth}.
1654 \membersection{wxGrid::SetColMinimalAcceptableWidth}\label{wxgridsetcolminimalacceptablewidth}
1656 \func{void}{SetColMinimalAcceptableWidth}{\param{int }{width}}
1658 This modifies the minimum column width that can be handled correctly. Specifying a low value here
1659 allows smaller grid cells to be dealt with correctly. Specifying a value here which is much smaller
1660 than the actual minimum size will incur a performance penalty in the functions which perform
1661 grid cell index lookup on the basis of screen coordinates.
1662 This should normally be called when creating the grid because it will not resize existing columns
1663 with sizes smaller than the value specified here.
1667 \membersection{wxGrid::SetColPos}\label{wxgridsetcolpos}
1669 \func{void}{SetColPos}{\param{int }{colID}, \param{int }{newPos}}
1671 Sets the position of the specified column.
1675 \membersection{wxGrid::SetColSize}\label{wxgridsetcolsize}
1677 \func{void}{SetColSize}{\param{int }{col}, \param{int }{width}}
1679 Sets the width of the specified column.
1681 This function does not refresh the grid. If you are calling it outside of a BeginBatch / EndBatch
1682 block you can use \helpref{wxGrid::ForceRefresh}{wxgridforcerefresh} to see the changes.
1684 Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will
1685 also be set as the minimal width for the column.
1688 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
1689 The memory requirements for this could become prohibitive if your grid is very large.
1693 \membersection{wxGrid::SetDefaultCellAlignment}\label{wxgridsetdefaultcellalignment}
1695 \func{void}{SetDefaultCellAlignment}{\param{int }{horiz}, \param{int }{vert}}
1697 Sets the default horizontal and vertical alignment for grid cell text.
1699 Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT.
1701 Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM.
1705 \membersection{wxGrid::SetDefaultCellBackgroundColour}\label{wxgridsetdefaultcellbackgroundcolour}
1707 \func{void}{SetDefaultCellBackgroundColour}{\param{const wxColour\&}{ colour}}
1709 Sets the default background colour for grid cells.
1713 \membersection{wxGrid::SetDefaultCellFont}\label{wxgridsetdefaultcellfont}
1715 \func{void}{SetDefaultCellFont}{\param{const wxFont\&}{ font}}
1717 Sets the default font to be used for grid cell text.
1721 \membersection{wxGrid::SetDefaultCellTextColour}\label{wxgridsetdefaultcelltextcolour}
1723 \func{void}{SetDefaultCellTextColour}{\param{const wxColour\&}{ colour}}
1725 Sets the current default colour for grid cell text.
1729 \membersection{wxGrid::SetDefaultEditor}\label{wxgridsetdefaulteditor}
1731 \func{void}{SetDefaultEditor}{\param{wxGridCellEditor* }{editor}}
1733 Sets the default editor for grid cells. The grid will take ownership of the pointer.
1735 See \helpref{wxGridCellEditor}{wxgridcelleditor} and
1736 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
1740 \membersection{wxGrid::SetDefaultRenderer}\label{wxgridsetdefaultrenderer}
1742 \func{void}{SetDefaultRenderer}{\param{wxGridCellRenderer* }{renderer}}
1744 Sets the default renderer for grid cells. The grid will take ownership of the pointer.
1746 See \helpref{wxGridCellRenderer}{wxgridcellrenderer} and
1747 the \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.
1751 \membersection{wxGrid::SetDefaultColSize}\label{wxgridsetdefaultcolsize}
1753 \func{void}{SetDefaultColSize}{\param{int }{width}, \param{bool }{resizeExistingCols = false}}
1755 Sets the default width for columns in the grid. This will only affect columns subsequently added to
1756 the grid unless resizeExistingCols is true.
1760 \membersection{wxGrid::SetDefaultRowSize}\label{wxgridsetdefaultrowsize}
1762 \func{void}{SetDefaultRowSize}{\param{int }{height}, \param{bool }{resizeExistingRows = false}}
1764 Sets the default height for rows in the grid. This will only affect rows subsequently added
1765 to the grid unless resizeExistingRows is true.
1769 \membersection{wxGrid::SetGridCursor}\label{wxgridsetgridcursor}
1771 \func{void}{SetGridCursor}{\param{int }{row}, \param{int }{col}}
1773 Set the grid cursor to the specified cell.
1774 This function calls \helpref{wxGrid::MakeCellVisible}{wxgridmakecellvisible}.
1778 \membersection{wxGrid::SetGridLineColour}\label{wxgridsetgridlinecolour}
1780 \func{void}{SetGridLineColour}{\param{const wxColour\&}{colour}}
1782 Sets the colour used to draw grid lines.
1786 \membersection{wxGrid::SetLabelBackgroundColour}\label{wxgridsetlabelbackgroundcolour}
1788 \func{void}{SetLabelBackgroundColour}{\param{const wxColour\&}{ colour}}
1790 Sets the background colour for row and column labels.
1794 \membersection{wxGrid::SetLabelFont}\label{wxgridsetlabelfont}
1796 \func{void}{SetLabelFont}{\param{const wxFont\&}{ font}}
1798 Sets the font for row and column labels.
1802 \membersection{wxGrid::SetLabelTextColour}\label{wxgridsetlabeltextcolour}
1804 \func{void}{SetLabelTextColour}{\param{const wxColour\&}{ colour}}
1806 Sets the colour for row and column label text.
1810 \membersection{wxGrid::SetMargins}\label{wxgridsetmargins}
1812 \func{void}{SetMargins}{\param{int }{extraWidth}, \param{int }{extraHeight}}
1814 A grid may occupy more space than needed for its rows/columns. This
1815 function allows to set how big this extra space is
1819 \membersection{wxGrid::SetOrCalcColumnSizes}\label{wxgridsetorcalccolumnsizes}
1821 \func{int}{SetOrCalcColumnSizes}{\param{bool }{calcOnly}, \param{bool }{setAsMin = true}}
1823 Common part of AutoSizeColumn/Row() and GetBestSize()
1827 \membersection{wxGrid::SetOrCalcRowSizes}\label{wxgridsetorcalcrowsizes}
1829 \func{int}{SetOrCalcRowSizes}{\param{bool }{calcOnly}, \param{bool }{setAsMin = true}}
1833 \membersection{wxGrid::SetReadOnly}\label{wxgridsetreadonly}
1835 \func{void}{SetReadOnly}{\param{int }{row}, \param{int }{col}, \param{bool }{isReadOnly = true}}
1837 Makes the cell at the specified location read-only or editable.
1838 See also \helpref{wxGrid::IsReadOnly}{wxgridisreadonly}.
1842 \membersection{wxGrid::SetRowAttr}\label{wxgridsetrowattr}
1844 \func{void}{SetRowAttr}{\param{int }{row}, \param{wxGridCellAttr* }{attr}}
1846 Sets the cell attributes for all cells in the specified row.
1847 See the \helpref{wxGridCellAttr}{wxgridcellattr} class for more information
1848 about controlling cell attributes.
1852 \membersection{wxGrid::SetRowLabelAlignment}\label{wxgridsetrowlabelalignment}
1854 \func{void}{SetRowLabelAlignment}{\param{int }{horiz}, \param{int }{vert}}
1856 Sets the horizontal and vertical alignment of row label text.
1858 Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT.
1860 Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM.
1864 \membersection{wxGrid::SetRowLabelSize}\label{wxgridsetrowlabelsize}
1866 \func{void}{SetRowLabelSize}{\param{int }{width}}
1868 Sets the width of the row labels.
1870 If \arg{width} equals \texttt{wxGRID\_AUTOSIZE} then width is calculated automatically
1871 so that no label is truncated. Note that this could be slow for a large table.
1875 \membersection{wxGrid::SetRowLabelValue}\label{wxgridsetrowlabelvalue}
1877 \func{void}{SetRowLabelValue}{\param{int }{row}, \param{const wxString\&}{ value}}
1879 Set the value for the given row label. If you are using a derived grid table you must
1880 override \helpref{wxGridTableBase::SetRowLabelValue}{wxgridtablebasesetrowlabelvalue}
1881 for this to have any effect.
1885 \membersection{wxGrid::SetRowMinimalHeight}\label{wxgridsetrowminimalheight}
1887 \func{void}{SetRowMinimalHeight}{\param{int }{row}, \param{int }{height}}
1889 Sets the minimal height for the specified row. This should normally be called when creating the grid
1890 because it will not resize a row that is already shorter than the minimal height.
1891 The height argument must be higher than the minimimal acceptable row height, see
1892 \helpref{wxGrid::GetRowMinimalAcceptableHeight}{wxgridgetrowminimalacceptableheight}.
1896 \membersection{wxGrid::SetRowMinimalAcceptableHeight}\label{wxgridsetrowminimalacceptableheight}
1898 \func{void}{SetRowMinimalAcceptableHeight}{\param{int }{height}}
1900 This modifies the minimum row width that can be handled correctly. Specifying a low value here
1901 allows smaller grid cells to be dealt with correctly. Specifying a value here which is much smaller
1902 than the actual minimum size will incur a performance penalty in the functions which perform
1903 grid cell index lookup on the basis of screen coordinates.
1904 This should normally be called when creating the grid because it will not resize existing rows
1905 with sizes smaller than the value specified here.
1909 \membersection{wxGrid::SetRowSize}\label{wxgridsetrowsize}
1911 \func{void}{SetRowSize}{\param{int }{row}, \param{int }{height}}
1913 Sets the height of the specified row.
1915 This function does not refresh the grid. If you are calling it outside of a BeginBatch / EndBatch
1916 block you can use \helpref{wxGrid::ForceRefresh}{wxgridforcerefresh} to see the changes.
1918 Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will
1919 also be set as the minimal width for the column.
1923 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
1924 The memory requirements for this could become prohibitive if your grid is very large.
1928 \membersection{wxGrid::SetScrollLineX}\label{wxgridsetscrolllinex}
1930 \func{void}{SetScrollLineX}{\param{int }{x}}
1932 Sets the number of pixels per horizontal scroll increment. The default is 15.
1933 Sometimes wxGrid has trouble setting the scrollbars correctly due to rounding
1934 errors: setting this to 1 can help.
1936 \wxheading{See also}
1938 \helpref{wxGrid::GetScrollLineX}{wxgridgetscrolllinex},\rtfsp
1939 \helpref{wxGrid::GetScrollLineY}{wxgridgetscrollliney},\rtfsp
1940 \helpref{wxGrid::SetScrollLineY}{wxgridsetscrollliney}
1944 \membersection{wxGrid::SetScrollLineY}\label{wxgridsetscrollliney}
1946 \func{void}{SetScrollLineY}{\param{int }{y}}
1948 Sets the number of pixels per vertical scroll increment. The default is 15.
1949 Sometimes wxGrid has trouble setting the scrollbars correctly due to rounding
1950 errors: setting this to 1 can help.
1952 \wxheading{See also}
1954 \helpref{wxGrid::GetScrollLineX}{wxgridgetscrolllinex},\rtfsp
1955 \helpref{wxGrid::GetScrollLineY}{wxgridgetscrollliney},\rtfsp
1956 \helpref{wxGrid::SetScrollLineX}{wxgridsetscrolllinex}
1960 \membersection{wxGrid::SetSelectionBackground}\label{wxgridsetselectionbackground}
1962 \func{void}{SetSelectionBackground}{\param{const wxColour\& }{c}}
1966 \membersection{wxGrid::SetSelectionForeground}\label{wxgridsetselectionforeground}
1968 \func{void}{SetSelectionForeground}{\param{const wxColour\& }{c}}
1972 \membersection{wxGrid::SetSelectionMode}\label{wxgridsetselectionmode}
1974 \func{void}{SetSelectionMode}{\param{wxGrid::wxGridSelectionModes}{ selmode}}
1976 Set the selection behaviour of the grid.
1978 \wxheading{Parameters}
1980 \docparam{wxGrid::wxGridSelectCells}{The default mode where individual cells are selected.}
1982 \docparam{wxGrid::wxGridSelectRows}{Selections will consist of whole rows.}
1984 \docparam{wxGrid::wxGridSelectColumns}{Selections will consist of whole columns.}
1988 \membersection{wxGrid::SetTable}\label{wxgridsettable}
1990 \func{bool}{SetTable}{\param{wxGridTableBase* }{table}, \param{bool }{takeOwnership = false}, \param{wxGrid::wxGridSelectionModes }{selmode = wxGrid::wxGridSelectCells}}
1992 Passes a pointer to a custom grid table to be used by the grid. This should be called
1993 after the grid constructor and before using the grid object. If takeOwnership is set to
1994 true then the table will be deleted by the wxGrid destructor.
1996 Use this function instead of \helpref{wxGrid::CreateGrid}{wxgridcreategrid} when your
1997 application involves complex or non-string data or data sets that are too large to fit
2002 \membersection{wxGrid::ShowCellEditControl}\label{wxgridshowcelleditcontrol}
2004 \func{void}{ShowCellEditControl}{\void}
2006 Displays the in-place cell edit control for the current cell.
2010 \membersection{wxGrid::XToCol}\label{wxgridxtocol}
2012 \constfunc{int}{XToCol}{\param{int }{x}, \param{bool }{clipToMinMax = false}}
2014 \wxheading{Parameters}
2015 \docparam{x}{The x position to evaluate.}
2016 \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.}
2018 \wxheading{Return value}
2019 The grid column that corresponds to the logical x coordinate. Returns
2020 {\tt wxNOT\_FOUND} if there is no column at the x position.
2024 \membersection{wxGrid::XToEdgeOfCol}\label{wxgridxtoedgeofcol}
2026 \constfunc{int}{XToEdgeOfCol}{\param{int }{x}}
2028 Returns the column whose right hand edge is close to the given logical x position.
2029 If no column edge is near to this position {\tt wxNOT\_FOUND} is returned.
2033 \membersection{wxGrid::YToEdgeOfRow}\label{wxgridytoedgeofrow}
2035 \constfunc{int}{YToEdgeOfRow}{\param{int }{y}}
2037 Returns the row whose bottom edge is close to the given logical y position.
2038 If no row edge is near to this position {\tt wxNOT\_FOUND} is returned.
2042 \membersection{wxGrid::YToRow}\label{wxgridytorow}
2044 \constfunc{int}{YToRow}{\param{int }{y}}
2046 Returns the grid row that corresponds to the logical y coordinate. Returns
2047 {\tt wxNOT\_FOUND} if there is no row at the y position.