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{wxWindow
}{wxwindow
}\\
37 \helpref{wxEvtHandler
}{wxevthandler
}\\
38 \helpref{wxObject
}{wxobject
}
40 \wxheading{Include files
}
44 \wxheading{Window styles
}
46 There are presently no specific window styles for wxGrid.
48 \wxheading{Event handling
}
52 The event handler for the following functions takes a
53 \helpref{wxGridSizeEvent
}{wxgridsizeevent
} parameter.
54 The ...
\_CMD\_... variants also take a window identifier.
57 \begin{twocollist
}\itemsep=
0pt
58 \twocolitem{{\bf EVT
\_GRID\_COL\_SIZE(func)
}}{The user resized a column by dragging it. Processes a wxEVT
\_GRID\_COL\_SIZE.
}
59 \twocolitem{{\bf EVT
\_GRID\_ROW\_SIZE(func)
}}{The user resized a row by dragging it. Processes a wxEVT
\_GRID\_ROW\_SIZE.
}
60 \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.
}
61 \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.
}
64 The event handler for the following functions takes a
65 \helpref{wxGridRangeSelectEvent
}{wxgridrangeselectevent
} parameter.
66 The ...
\_CMD\_... variant also takes a window identifier.
69 \begin{twocollist
}\itemsep=
0pt
70 \twocolitem{{\bf EVT
\_GRID\_RANGE\_SELECT(func)
}}{The user selected a group of contiguous cells. Processes a wxEVT
\_GRID\_RANGE\_SELECT.
}
71 \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.
}
74 The event handler for the following functions takes a
75 \helpref{wxGridEditorCreatedEvent
}{wxgrideditorcreatedevent
} parameter.
76 The ...
\_CMD\_... variant also takes a window identifier.
79 \begin{twocollist
}\itemsep=
0pt
80 \twocolitem{{\bf EVT
\_GRID\_EDITOR\_CREATED(func)
}}{The editor for a cell was created. Processes a wxEVT
\_GRID\_EDITOR\_CREATED.
}
81 \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.
}
86 \helpref{wxGrid overview
}{gridoverview
}
88 %%%%%%%%%%% FUNCTION GROUPS %%%%%%%%%%%%%
89 \latexignore{\rtfignore{\wxheading{Function groups
}}}
93 \membersection{Constructors and initialization
}\label{wxgridconstructors
}
95 \helpref{wxGrid
}{wxgridctor
}\\
96 \helpref{\destruct{wxGrid
}}{wxgriddtor
}\\
97 \helpref{CreateGrid
}{wxgridcreategrid
}\\
98 \helpref{SetTable
}{wxgridsettable
}
102 \membersection{Display format
}\label{wxgriddisplayformat
}
106 \membersection{Selection functions
}\label{wxgridselectionfunctions
}
108 \helpref{wxGrid::ClearSelection
}{wxgridclearselection
}\\
109 \helpref{wxGrid::IsSelection
}{wxgridisselection
}\\
110 \helpref{wxGrid::SelectAll
}{wxgridselectall
}\\
111 \helpref{wxGrid::SelectBlock
}{wxgridselectblock
}\\
112 \helpref{wxGrid::SelectCol
}{wxgridselectcol
}\\
113 \helpref{wxGrid::SelectRow
}{wxgridselectrow
}
115 %%%%%%%%% MEMBER FUNCTIONS %%%%%%%%%%
116 \helponly{\insertatlevel{2}{
124 \membersection{wxGrid::wxGrid
}\label{wxgridctor
}
126 \func{}{wxGrid
}{\void}
130 \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
}}
132 Constructor to create a grid object. Call either
\helpref{wxGrid::CreateGrid
}{wxgridcreategrid
} or
133 \helpref{wxGrid::SetTable
}{wxgridsettable
} directly after this to initialize the grid before using
138 \membersection{wxGrid::
\destruct{wxGrid
}}\label{wxgriddtor
}
140 \func{}{\destruct{wxGrid
}}{\void}
142 Destructor. This will also destroy the associated grid table unless you passed a table
143 object to the grid and specified that the grid should not take ownership of the
144 table (see
\helpref{wxGrid::SetTable
}{wxgridsettable
}).
148 \membersection{wxGrid::AppendCols
}\label{wxgridappendcols
}
150 \func{bool
}{AppendCols
}{\param{int
}{numCols =
1},
\param{bool
}{updateLabels = true
}}
152 Appends one or more new columns to the right of the grid and returns true if
153 successful. The updateLabels argument is not used at present.
155 If you are using a derived grid table class you will need to override
156 \helpref{wxGridTableBase::AppendCols
}{wxgridtablebaseappendcols
}. See
157 \helpref{wxGrid::InsertCols
}{wxgridinsertcols
} for further information.
161 \membersection{wxGrid::AppendRows
}\label{wxgridappendrows
}
163 \func{bool
}{AppendRows
}{\param{int
}{numRows =
1},
\param{bool
}{updateLabels = true
}}
165 Appends one or more new rows to the bottom of the grid and returns true if
166 successful. The updateLabels argument is not used at present.
168 If you are using a derived grid table class you will need to override
169 \helpref{wxGridTableBase::AppendRows
}{wxgridtablebaseappendrows
}. See
170 \helpref{wxGrid::InsertRows
}{wxgridinsertrows
} for further information.
174 \membersection{wxGrid::AutoSize
}\label{wxgridautosize
}
176 \func{void
}{AutoSize
}{\void}
178 Automatically sets the height and width of all rows and columns to fit their contents.
181 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
182 The memory requirements for this could become prohibitive if your grid is very large.
186 \membersection{wxGrid::AutoSizeColOrRow
}\label{wxgridautosizecolorrow
}
188 \func{void
}{AutoSizeColOrRow
}{\param{int
}{n
},
\param{bool
}{setAsMin
},
\param{bool
}{column
}}
190 Common part of AutoSizeColumn/Row() or row?
194 \membersection{wxGrid::AutoSizeColumn
}\label{wxgridautosizecolumn
}
196 \func{void
}{AutoSizeColumn
}{\param{int
}{col
},
\param{bool
}{setAsMin = true
}}
198 Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will
199 also be set as the minimal width for the column.
202 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
203 The memory requirements for this could become prohibitive if your grid is very large.
207 \membersection{wxGrid::AutoSizeColumns
}\label{wxgridautosizecolumns
}
209 \func{void
}{AutoSizeColumns
}{\param{bool
}{setAsMin = true
}}
211 Automatically sizes all columns to fit their contents. If setAsMin is true the calculated widths will
212 also be set as the minimal widths for the columns.
215 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
216 The memory requirements for this could become prohibitive if your grid is very large.
220 \membersection{wxGrid::AutoSizeRow
}\label{wxgridautosizerow
}
222 \func{void
}{AutoSizeRow
}{\param{int
}{row
},
\param{bool
}{setAsMin = true
}}
224 Automatically sizes the row to fit its contents. If setAsMin is true the calculated height will
225 also be set as the minimal height for the row.
228 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
229 The memory requirements for this could become prohibitive if your grid is very large.
233 \membersection{wxGrid::AutoSizeRows
}\label{wxgridautosizerows
}
235 \func{void
}{AutoSizeRows
}{\param{bool
}{setAsMin = true
}}
237 Automatically sizes all rows to fit their contents. If setAsMin is true the calculated heights will
238 also be set as the minimal heights for the rows.
241 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
242 The memory requirements for this could become prohibitive if your grid is very large.
246 \membersection{wxGrid::BeginBatch
}\label{wxgridbeginbatch
}
248 \func{void
}{BeginBatch
}{\void}
250 Increments the grid's batch count. When the count is greater than zero repainting of
251 the grid is suppressed. Each call to BeginBatch must be matched by a later call to
252 \helpref{wxGrid::EndBatch
}{wxgridendbatch
}. Code that does a lot of grid
253 modification can be enclosed between BeginBatch and EndBatch calls to avoid
254 screen flicker. The final EndBatch will cause the grid to be repainted.
258 \membersection{wxGrid::BlockToDeviceRect
}\label{wxgridblocktodevicerect
}
260 \func{wxRect
}{BlockToDeviceRect
}{\param{const wxGridCellCoords \&
}{topLeft
},
\param{const wxGridCellCoords \&
}{bottomRight
}}
262 This function returns the rectangle that encloses the block of cells
263 limited by TopLeft and BottomRight cell in device coords and clipped
264 to the client size of the grid window.
268 \membersection{wxGrid::CanDragColMove
}\label{wxgridcandragcolmove
}
270 \func{bool
}{CanDragColMove
}{\void}
272 Returns true if columns can be moved by dragging with the mouse. Columns can be moved
273 by dragging on their labels.
277 \membersection{wxGrid::CanDragColSize
}\label{wxgridcandragcolsize
}
279 \func{bool
}{CanDragColSize
}{\void}
281 Returns true if columns can be resized by dragging with the mouse. Columns can be resized
282 by dragging the edges of their labels. If grid line dragging is enabled they can also be
283 resized by dragging the right edge of the column in the grid cell area
284 (see
\helpref{wxGrid::EnableDragGridSize
}{wxgridenabledraggridsize
}).
288 \membersection{wxGrid::CanDragRowSize
}\label{wxgridcandragrowsize
}
290 \func{bool
}{CanDragRowSize
}{\void}
292 Returns true if rows can be resized by dragging with the mouse. Rows can be resized
293 by dragging the edges of their labels. If grid line dragging is enabled they can also be
294 resized by dragging the lower edge of the row in the grid cell area
295 (see
\helpref{wxGrid::EnableDragGridSize
}{wxgridenabledraggridsize
}).
299 \membersection{wxGrid::CanDragGridSize
}\label{wxgridcandraggridsize
}
301 \func{bool
}{CanDragGridSize
}{\void}
303 Return true if the dragging of grid lines to resize rows and columns is enabled or false otherwise.
307 \membersection{wxGrid::CanEnableCellControl
}\label{wxgridcanenablecellcontrol
}
309 \constfunc{bool
}{CanEnableCellControl
}{\void}
311 Returns true if the in-place edit control for the current grid cell can be used and
312 false otherwise (e.g. if the current cell is read-only).
316 \membersection{wxGrid::CanHaveAttributes
}\label{wxgridcanhaveattributes
}
318 \func{bool
}{CanHaveAttributes
}{\void}
320 Do we have some place to store attributes in?
324 \membersection{wxGrid::CellToRect
}\label{wxgridcelltorect
}
326 \func{wxRect
}{CellToRect
}{\param{int
}{row
},
\param{int
}{col
}}
328 \func{wxRect
}{CellToRect
}{\param{const wxGridCellCoords\&
}{coords
}}
330 Return the rectangle corresponding to the grid cell's size and position in logical
335 \membersection{wxGrid::ClearGrid
}\label{wxgridcleargrid
}
337 \func{void
}{ClearGrid
}{\void}
339 Clears all data in the underlying grid table and repaints the grid. The table is not deleted by
340 this function. If you are using a derived table class then you need to override
341 \helpref{wxGridTableBase::Clear
}{wxgridtablebaseclear
} for this function to have any effect.
345 \membersection{wxGrid::ClearSelection
}\label{wxgridclearselection
}
347 \func{void
}{ClearSelection
}{\void}
349 Deselects all cells that are currently selected.
353 \membersection{wxGrid::CreateGrid
}\label{wxgridcreategrid
}
355 \func{bool
}{CreateGrid
}{\param{int
}{numRows
},
\param{int
}{numCols
},
\param{wxGrid::wxGridSelectionModes
}{selmode = wxGrid::wxGridSelectCells
}}
357 Creates a grid with the specified initial number of rows and columns.
358 Call this directly after the grid constructor. When you use this
359 function wxGrid will create and manage a simple table of string values
360 for you. All of the grid data will be stored in memory.
362 For applications with more complex data types or relationships, or for
363 dealing with very large datasets, you should derive your own grid table
364 class and pass a table object to the grid with
\helpref{wxGrid::SetTable
}{wxgridsettable
}.
368 \membersection{wxGrid::DeleteCols
}\label{wxgriddeletecols
}
370 \func{bool
}{DeleteCols
}{\param{int
}{pos =
0},
\param{int
}{numCols =
1},
\param{bool
}{updateLabels = true
}}
372 Deletes one or more columns from a grid starting at the specified position and returns
373 true if successful. The updateLabels argument is not used at present.
375 If you are using a derived grid table class you will need to override
376 \helpref{wxGridTableBase::DeleteCols
}{wxgridtablebasedeletecols
}. See
377 \helpref{wxGrid::InsertCols
}{wxgridinsertcols
} for further information.
381 \membersection{wxGrid::DeleteRows
}\label{wxgriddeleterows
}
383 \func{bool
}{DeleteRows
}{\param{int
}{pos =
0},
\param{int
}{numRows =
1},
\param{bool
}{updateLabels = true
}}
385 Deletes one or more rows from a grid starting at the specified position and returns
386 true if successful. The updateLabels argument is not used at present.
388 If you are using a derived grid table class you will need to override
389 \helpref{wxGridTableBase::DeleteRows
}{wxgridtablebasedeleterows
}. See
390 \helpref{wxGrid::InsertRows
}{wxgridinsertrows
} for further information.
394 \membersection{wxGrid::DisableCellEditControl
}\label{wxgriddisablecelleditcontrol
}
396 \func{void
}{DisableCellEditControl
}{\void}
398 Disables in-place editing of grid cells.
399 Equivalent to calling EnableCellEditControl(false).
403 \membersection{wxGrid::DisableDragColMove
}\label{wxgriddisabledragcolmove
}
405 \func{void
}{DisableDragColMove
}{\void}
407 Disables column moving by dragging with the mouse. Equivalent to passing false to
408 \helpref{wxGrid::EnableDragColMove
}{wxgridenabledragcolmove
}.
412 \membersection{wxGrid::DisableDragColSize
}\label{wxgriddisabledragcolsize
}
414 \func{void
}{DisableDragColSize
}{\void}
416 Disables column sizing by dragging with the mouse. Equivalent to passing false to
417 \helpref{wxGrid::EnableDragColSize
}{wxgridenabledragcolsize
}.
421 \membersection{wxGrid::DisableDragGridSize
}\label{wxgriddisabledraggridsize
}
423 \func{void
}{DisableDragGridSize
}{\void}
425 Disable mouse dragging of grid lines to resize rows and columns. Equivalent to passing
426 false to
\helpref{wxGrid::EnableDragGridSize
}{wxgridenabledraggridsize
}
430 \membersection{wxGrid::DisableDragRowSize
}\label{wxgriddisabledragrowsize
}
432 \func{void
}{DisableDragRowSize
}{\void}
434 Disables row sizing by dragging with the mouse. Equivalent to passing false to
435 \helpref{wxGrid::EnableDragRowSize
}{wxgridenabledragrowsize
}.
439 \membersection{wxGrid::EnableCellEditControl
}\label{wxgridenablecelleditcontrol
}
441 \func{void
}{EnableCellEditControl
}{\param{bool
}{enable = true
}}
443 Enables or disables in-place editing of grid cell data. The grid will issue either a
444 wxEVT
\_GRID\_EDITOR\_SHOWN or wxEVT
\_GRID\_EDITOR\_HIDDEN event.
448 \membersection{wxGrid::EnableDragColSize
}\label{wxgridenabledragcolsize
}
450 \func{void
}{EnableDragColSize
}{\param{bool
}{enable = true
}}
452 Enables or disables column sizing by dragging with the mouse.
456 \membersection{wxGrid::EnableDragColMove
}\label{wxgridenabledragcolmove
}
458 \func{void
}{EnableDragColMove
}{\param{bool
}{enable = true
}}
460 Enables or disables column moving by dragging with the mouse.
464 \membersection{wxGrid::EnableDragGridSize
}\label{wxgridenabledraggridsize
}
466 \func{void
}{EnableDragGridSize
}{\param{bool
}{enable = true
}}
468 Enables or disables row and column resizing by dragging gridlines with the mouse.
472 \membersection{wxGrid::EnableDragRowSize
}\label{wxgridenabledragrowsize
}
474 \func{void
}{EnableDragRowSize
}{\param{bool
}{enable = true
}}
476 Enables or disables row sizing by dragging with the mouse.
480 \membersection{wxGrid::EnableEditing
}\label{wxgridenableediting
}
482 \func{void
}{EnableEditing
}{\param{bool
}{edit
}}
484 If the edit argument is false this function sets the whole grid as read-only. If the
485 argument is true the grid is set to the default state where cells may be editable. In the
486 default state you can set single grid cells and whole rows and columns to be editable or
488 \helpref{wxGridCellAttribute::SetReadOnly
}{wxgridcellattrsetreadonly
}. For single
489 cells you can also use the shortcut function
490 \helpref{wxGrid::SetReadOnly
}{wxgridsetreadonly
}.
492 For more information about controlling grid cell attributes see the
493 \helpref{wxGridCellAttr
}{wxgridcellattr
} cell attribute class and the
494 \helpref{wxGrid classes overview
}{gridoverview
}.
498 \membersection{wxGrid::EnableGridLines
}\label{wxgridenablegridlines
}
500 \func{void
}{EnableGridLines
}{\param{bool
}{enable = true
}}
502 Turns the drawing of grid lines on or off.
506 \membersection{wxGrid::EndBatch
}\label{wxgridendbatch
}
508 \func{void
}{EndBatch
}{\void}
510 Decrements the grid's batch count. When the count is greater than zero repainting of
511 the grid is suppressed. Each previous call to
512 \helpref{wxGrid::BeginBatch
}{wxgridbeginbatch
} must be matched by a later call to
513 EndBatch. Code that does a lot of grid modification can be enclosed between
514 BeginBatch and EndBatch calls to avoid screen flicker. The final EndBatch will
515 cause the grid to be repainted.
519 \membersection{wxGrid::Fit
}\label{wxgridfit
}
521 \func{void
}{Fit
}{\void}
523 Overridden wxWindow method.
527 \membersection{wxGrid::ForceRefresh
}\label{wxgridforcerefresh
}
529 \func{void
}{ForceRefresh
}{\void}
531 Causes immediate repainting of the grid. Use this instead of the usual wxWindow::Refresh.
535 \membersection{wxGrid::GetBatchCount
}\label{wxgridgetbatchcount
}
537 \func{int
}{GetBatchCount
}{\void}
539 Returns the number of times that
\helpref{wxGrid::BeginBatch
}{wxgridbeginbatch
} has been called
540 without (yet) matching calls to
\helpref{wxGrid::EndBatch
}{wxgridendbatch
}. While
541 the grid's batch count is greater than zero the display will not be updated.
545 \membersection{wxGrid::GetCellAlignment
}\label{wxgridgetcellalignment
}
547 \func{void
}{GetCellAlignment
}{\param{int
}{row
},
\param{int
}{col
},
\param{int*
}{horiz
},
\param{int*
}{vert
}}
549 Sets the arguments to the horizontal and vertical text alignment values for the
550 grid cell at the specified location.
552 Horizontal alignment will be one of wxALIGN
\_LEFT, wxALIGN
\_CENTRE or wxALIGN
\_RIGHT. \\
553 Vertical alignment will be one of wxALIGN
\_TOP, wxALIGN
\_CENTRE or wxALIGN
\_BOTTOM.
555 \perlnote{This method only takes the parameters
{\tt row
} and
{\tt col
} and
556 returns a
2-element list
{\tt ( horiz, vert )
}.
}
560 \membersection{wxGrid::GetCellBackgroundColour
}\label{wxgridgetcellbackgroundcolour
}
562 \func{wxColour
}{GetCellBackgroundColour
}{\param{int
}{row
},
\param{int
}{col
}}
564 Returns the background colour of the cell at the specified location.
568 \membersection{wxGrid::GetCellEditor
}\label{wxgridgetcelleditor
}
570 \func{wxGridCellEditor*
}{GetCellEditor
}{\param{int
}{row
},
\param{int
}{col
}}
572 Returns a pointer to the editor for the cell at the specified location.
574 See
\helpref{wxGridCellEditor
}{wxgridcelleditor
} and
575 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
579 \membersection{wxGrid::GetCellFont
}\label{wxgridgetcellfont
}
581 \func{wxFont
}{GetCellFont
}{\param{int
}{row
},
\param{int
}{col
}}
583 Returns the font for text in the grid cell at the specified location.
587 \membersection{wxGrid::GetCellRenderer
}\label{wxgridgetcellrenderer
}
589 \func{wxGridCellRenderer*
}{GetCellRenderer
}{\param{int
}{row
},
\param{int
}{col
}}
591 Returns a pointer to the renderer for the grid cell at the specified location.
593 See
\helpref{wxGridCellRenderer
}{wxgridcellrenderer
} and
594 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
598 \membersection{wxGrid::GetCellTextColour
}\label{wxgridgetcelltextcolour
}
600 \func{wxColour
}{GetCellTextColour
}{\param{int
}{row
},
\param{int
}{col
}}
602 Returns the text colour for the grid cell at the specified location.
606 \membersection{wxGrid::GetCellValue
}\label{wxgridgetcellvalue
}
608 \func{wxString
}{GetCellValue
}{\param{int
}{row
},
\param{int
}{col
}}
610 \func{wxString
}{GetCellValue
}{\param{const wxGridCellCoords\&
}{coords
}}
612 Returns the string contained in the cell at the specified location. For simple applications where a
613 grid object automatically uses a default grid table of string values you use this function together
614 with
\helpref{wxGrid::SetCellValue
}{wxgridsetcellvalue
} to access cell values.
616 For more complex applications where you have derived your own grid table class that contains
617 various data types (e.g. numeric, boolean or user-defined custom types) then you only use this
618 function for those cells that contain string values.
620 See
\helpref{wxGridTableBase::CanGetValueAs
}{wxgridtablebasecangetvalueas
}
621 and the
\helpref{wxGrid overview
}{gridoverview
} for more information.
625 \membersection{wxGrid::GetColAt
}\label{wxgridgetcolat
}
627 \constfunc{int
}{GetColAt
}{\param{int
}{colPos
}}
629 Returns the column ID of the specified column position.
632 \membersection{wxGrid::GetColLeft
}\label{wxgridgetcolleft
}
634 \constfunc{int
}{GetColLeft
}{\param{int
}{col
}}
638 \membersection{wxGrid::GetColLabelAlignment
}\label{wxgridgetcollabelalignment
}
640 \func{void
}{GetColLabelAlignment
}{\param{int*
}{horiz
},
\param{int*
}{vert
}}
642 Sets the arguments to the current column label alignment values.
644 Horizontal alignment will be one of wxALIGN
\_LEFT, wxALIGN
\_CENTRE or wxALIGN
\_RIGHT.\\
645 Vertical alignment will be one of wxALIGN
\_TOP, wxALIGN
\_CENTRE or wxALIGN
\_BOTTOM.
647 \perlnote{This method takes no parameters and
648 returns a
2-element list
{\tt ( horiz, vert )
}.
}
652 \membersection{wxGrid::GetColLabelSize
}\label{wxgridgetcollabelsize
}
654 \func{int
}{GetColLabelSize
}{\void}
656 Returns the current height of the column labels.
660 \membersection{wxGrid::GetColLabelValue
}\label{wxgridgetcollabelvalue
}
662 \func{wxString
}{GetColLabelValue
}{\param{int
}{col
}}
664 Returns the specified column label. The default grid table class provides column labels of
665 the form A,B...Z,AA,AB...ZZ,AAA... If you are using a custom grid table you can override
666 \helpref{wxGridTableBase::GetColLabelValue
}{wxgridtablebasegetcollabelvalue
} to provide
671 \membersection{wxGrid::GetColMinimalAcceptableWidth
}\label{wxgridgetcolminimalacceptablewidth
}
673 \func{int
}{GetColMinimalAcceptableWidth
}{}
675 This returns the value of the lowest column width that can be handled correctly. See
676 member
\helpref{SetColMinimalAcceptableWidth
}{wxgridsetcolminimalacceptablewidth
} for details.
680 \membersection{wxGrid::GetColMinimalWidth
}\label{wxgridgetcolminimalwidth
}
682 \constfunc{int
}{GetColMinimalWidth
}{\param{int
}{col
}}
684 Get the minimal width of the given column/row.
688 \membersection{wxGrid::GetColPos
}\label{wxgridgetcolpos
}
690 \constfunc{int
}{GetColPos
}{\param{int
}{colID
}}
692 Returns the position of the specified column.
696 \membersection{wxGrid::GetColRight
}\label{wxgridgetcolright
}
698 \constfunc{int
}{GetColRight
}{\param{int
}{col
}}
702 \membersection{wxGrid::GetColSize
}\label{wxgridgetcolsize
}
704 \func{int
}{GetColSize
}{\param{int
}{col
}}
706 Returns the width of the specified column.
710 \membersection{wxGrid::GetDefaultCellAlignment
}\label{wxgridgetdefaultcellalignment
}
712 \func{void
}{GetDefaultCellAlignment
}{\param{int*
}{horiz
},
\param{int*
}{vert
}}
714 Sets the arguments to the current default horizontal and vertical text alignment
717 Horizontal alignment will be one of wxALIGN
\_LEFT, wxALIGN
\_CENTRE or wxALIGN
\_RIGHT. \\
718 Vertical alignment will be one of wxALIGN
\_TOP, wxALIGN
\_CENTRE or wxALIGN
\_BOTTOM.
722 \membersection{wxGrid::GetDefaultCellBackgroundColour
}\label{wxgridgetdefaultcellbackgroundcolour
}
724 \func{wxColour
}{GetDefaultCellBackgroundColour
}{\void}
726 Returns the current default background colour for grid cells.
730 \membersection{wxGrid::GetDefaultCellFont
}\label{wxgridgetdefaultcellfont
}
732 \func{wxFont
}{GetDefaultCellFont
}{\void}
734 Returns the current default font for grid cell text.
738 \membersection{wxGrid::GetDefaultCellTextColour
}\label{wxgridgetdefaultcelltextcolour
}
740 \func{wxColour
}{GetDefaultCellTextColour
}{\void}
742 Returns the current default colour for grid cell text.
746 \membersection{wxGrid::GetDefaultColLabelSize
}\label{wxgridgetdefaultcollabelsize
}
748 \func{int
}{GetDefaultColLabelSize
}{\void}
750 Returns the default height for column labels.
754 \membersection{wxGrid::GetDefaultColSize
}\label{wxgridgetdefaultcolsize
}
756 \func{int
}{GetDefaultColSize
}{\void}
758 Returns the current default width for grid columns.
762 \membersection{wxGrid::GetDefaultEditor
}\label{wxgridgetdefaulteditor
}
764 \constfunc{wxGridCellEditor*
}{GetDefaultEditor
}{\void}
766 Returns a pointer to the current default grid cell editor.
768 See
\helpref{wxGridCellEditor
}{wxgridcelleditor
} and
769 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
773 \membersection{wxGrid::GetDefaultEditorForCell
}\label{wxgridgetdefaulteditorforcell
}
775 \constfunc{wxGridCellEditor*
}{GetDefaultEditorForCell
}{\param{int
}{row
},
\param{int
}{col
}}
777 \constfunc{wxGridCellEditor*
}{GetDefaultEditorForCell
}{\param{const wxGridCellCoords\&
}{c
}}
781 \membersection{wxGrid::GetDefaultEditorForType
}\label{wxgridgetdefaulteditorfortype
}
783 \constfunc{wxGridCellEditor*
}{GetDefaultEditorForType
}{\param{const wxString\&
}{typeName
}}
787 \membersection{wxGrid::GetDefaultRenderer
}\label{wxgridgetdefaultrenderer
}
789 \constfunc{wxGridCellRenderer*
}{GetDefaultRenderer
}{\void}
791 Returns a pointer to the current default grid cell renderer.
793 See
\helpref{wxGridCellRenderer
}{wxgridcellrenderer
} and
794 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
798 \membersection{wxGrid::GetDefaultRendererForCell
}\label{wxgridgetdefaultrendererforcell
}
800 \constfunc{wxGridCellRenderer*
}{GetDefaultRendererForCell
}{\param{int
}{row
},
\param{int
}{col
}}
804 \membersection{wxGrid::GetDefaultRendererForType
}\label{wxgridgetdefaultrendererfortype
}
806 \constfunc{wxGridCellRenderer*
}{GetDefaultRendererForType
}{\param{const wxString\&
}{typeName
}}
810 \membersection{wxGrid::GetDefaultRowLabelSize
}\label{wxgridgetdefaultrowlabelsize
}
812 \func{int
}{GetDefaultRowLabelSize
}{\void}
814 Returns the default width for the row labels.
818 \membersection{wxGrid::GetDefaultRowSize
}\label{wxgridgetdefaultrowsize
}
820 \func{int
}{GetDefaultRowSize
}{\void}
822 Returns the current default height for grid rows.
826 \membersection{wxGrid::GetGridCursorCol
}\label{wxgridgetgridcursorcol
}
828 \func{int
}{GetGridCursorCol
}{\void}
830 Returns the current grid cell column position.
834 \membersection{wxGrid::GetGridCursorRow
}\label{wxgridgetgridcursorrow
}
836 \func{int
}{GetGridCursorRow
}{\void}
838 Returns the current grid cell row position.
842 \membersection{wxGrid::GetGridLineColour
}\label{wxgridgetgridlinecolour
}
844 \func{wxColour
}{GetGridLineColour
}{\void}
846 Returns the colour used for grid lines.
850 \membersection{wxGrid::GridLinesEnabled
}\label{wxgridgridlinesenabled
}
852 \func{bool
}{GridLinesEnabled
}{\void}
854 Returns true if drawing of grid lines is turned on, false otherwise.
858 \membersection{wxGrid::GetLabelBackgroundColour
}\label{wxgridgetlabelbackgroundcolour
}
860 \func{wxColour
}{GetLabelBackgroundColour
}{\void}
862 Returns the colour used for the background of row and column labels.
866 \membersection{wxGrid::GetLabelFont
}\label{wxgridgetlabelfont
}
868 \func{wxFont
}{GetLabelFont
}{\void}
870 Returns the font used for row and column labels.
874 \membersection{wxGrid::GetLabelTextColour
}\label{wxgridgetlabeltextcolour
}
876 \func{wxColour
}{GetLabelTextColour
}{\void}
878 Returns the colour used for row and column label text.
882 \membersection{wxGrid::GetNumberCols
}\label{wxgridgetnumbercols
}
884 \func{int
}{GetNumberCols
}{\void}
886 Returns the total number of grid columns (actually the number of columns in the underlying grid
891 \membersection{wxGrid::GetNumberRows
}\label{wxgridgetnumberrows
}
893 \func{int
}{GetNumberRows
}{\void}
895 Returns the total number of grid rows (actually the number of rows in the underlying grid table).
899 \membersection{wxGrid::GetOrCreateCellAttr
}\label{wxgridgetorcreatecellattr
}
901 \constfunc{wxGridCellAttr*
}{GetOrCreateCellAttr
}{\param{int
}{row
},
\param{int
}{col
}}
905 \membersection{wxGrid::GetRowMinimalAcceptableHeight
}\label{wxgridgetrowminimalacceptableheight
}
907 \func{int
}{GetRowMinimalAcceptableHeight
}{}
909 This returns the value of the lowest row width that can be handled correctly. See
910 member
\helpref{SetRowMinimalAcceptableHeight
}{wxgridsetrowminimalacceptableheight
} for details.
914 \membersection{wxGrid::GetRowMinimalHeight
}\label{wxgridgetrowminimalheight
}
916 \constfunc{int
}{GetRowMinimalHeight
}{\param{int
}{col
}}
920 \membersection{wxGrid::GetRowLabelAlignment
}\label{wxgridgetrowlabelalignment
}
922 \func{void
}{GetRowLabelAlignment
}{\param{int*
}{horiz
},
\param{int*
}{vert
}}
924 Sets the arguments to the current row label alignment values.
926 Horizontal alignment will be one of wxLEFT, wxCENTRE or wxRIGHT. \\
927 Vertical alignment will be one of wxTOP, wxCENTRE or wxBOTTOM.
929 \perlnote{This method takes no parameters and
930 returns a
2-element list
{\tt ( horiz, vert )
}.
}
934 \membersection{wxGrid::GetRowLabelSize
}\label{wxgridgetrowlabelsize
}
936 \func{int
}{GetRowLabelSize
}{\void}
938 Returns the current width of the row labels.
942 \membersection{wxGrid::GetRowLabelValue
}\label{wxgridgetrowlabelvalue
}
944 \func{wxString
}{GetRowLabelValue
}{\param{int
}{row
}}
946 Returns the specified row label. The default grid table class provides numeric row labels.
947 If you are using a custom grid table you can override
948 \helpref{wxGridTableBase::GetRowLabelValue
}{wxgridtablebasegetcollabelvalue
} to provide
953 \membersection{wxGrid::GetRowSize
}\label{wxgridgetrowsize
}
955 \func{int
}{GetRowSize
}{\param{int
}{row
}}
957 Returns the height of the specified row.
961 \membersection{wxGrid::GetScrollLineX
}\label{wxgridgetscrolllinex
}
963 \constfunc{int
}{GetScrollLineX
}{\void}
965 Returns the number of pixels per horizontal scroll increment. The default is
15.
969 \helpref{wxGrid::GetScrollLineY
}{wxgridgetscrollliney
},
\rtfsp
970 \helpref{wxGrid::SetScrollLineX
}{wxgridsetscrolllinex
},
\rtfsp
971 \helpref{wxGrid::SetScrollLineY
}{wxgridsetscrollliney
}
975 \membersection{wxGrid::GetScrollLineY
}\label{wxgridgetscrollliney
}
977 \constfunc{int
}{GetScrollLineY
}{\void}
979 Returns the number of pixels per vertical scroll increment. The default is
15.
983 \helpref{wxGrid::GetScrollLineX
}{wxgridgetscrolllinex
},
\rtfsp
984 \helpref{wxGrid::SetScrollLineX
}{wxgridsetscrolllinex
},
\rtfsp
985 \helpref{wxGrid::SetScrollLineY
}{wxgridsetscrollliney
}
989 \membersection{wxGrid::GetSelectionMode
}\label{wxgridgetselectionmode
}
991 \constfunc{wxGrid::wxGridSelectionModes
}{GetSelectionMode
}{\void}
993 Returns the current selection mode, see
\helpref{wxGrid::SetSelectionMode
}{wxgridsetselectionmode
}.
997 \membersection{wxGrid::GetSelectedCells
}\label{wxgridgetselectedcells
}
999 \constfunc{wxGridCellCoordsArray
}{GetSelectedCells
}{\void}
1001 Returns an array of singly selected cells.
1005 \membersection{wxGrid::GetSelectedCols
}\label{wxgridgetselectedcols
}
1007 \constfunc{wxArrayInt
}{GetSelectedCols
}{\void}
1009 Returns an array of selected cols.
1013 \membersection{wxGrid::GetSelectedRows
}\label{wxgridgetselectedrows
}
1015 \constfunc{wxArrayInt
}{GetSelectedRows
}{\void}
1017 Returns an array of selected rows.
1021 \membersection{wxGrid::GetSelectionBackground
}\label{wxgridgetselectionbackground
}
1023 \constfunc{wxColour
}{GetSelectionBackground
}{\void}
1025 Access or update the selection fore/back colours
1029 \membersection{wxGrid::GetSelectionBlockTopLeft
}\label{wxgridgetselectionblocktopleft
}
1031 \constfunc{wxGridCellCoordsArray
}{GetSelectionBlockTopLeft
}{\void}
1033 Returns an array of the top left corners of blocks of selected cells,
1034 see
\helpref{wxGrid::GetSelectionBlockBottomRight
}{wxgridgetselectionblockbottomright
}.
1038 \membersection{wxGrid::GetSelectionBlockBottomRight
}\label{wxgridgetselectionblockbottomright
}
1040 \constfunc{wxGridCellCoordsArray
}{GetSelectionBlockBottomRight
}{\void}
1042 Returns an array of the bottom right corners of blocks of selected cells,
1043 see
\helpref{wxGrid::GetSelectionBlockTopLeft
}{wxgridgetselectionblocktopleft
}.
1047 \membersection{wxGrid::GetSelectionForeground
}\label{wxgridgetselectionforeground
}
1049 \constfunc{wxColour
}{GetSelectionForeground
}{\void}
1053 \membersection{wxGrid::GetTable
}\label{wxgridgettable
}
1055 \constfunc{wxGridTableBase *
}{GetTable
}{\void}
1057 Returns a base pointer to the current table object.
1061 \membersection{wxGrid::GetViewWidth
}\label{wxgridgetviewwidth
}
1063 \func{int
}{GetViewWidth
}{\void}
1065 Returned number of whole cols visible.
1069 \membersection{wxGrid::HideCellEditControl
}\label{wxgridhidecelleditcontrol
}
1071 \func{void
}{HideCellEditControl
}{\void}
1073 Hides the in-place cell edit control.
1077 \membersection{wxGrid::InitColWidths
}\label{wxgridinitcolwidths
}
1079 \func{void
}{InitColWidths
}{\void}
1081 Init the m
\_colWidths/Rights arrays
1085 \membersection{wxGrid::InitRowHeights
}\label{wxgridinitrowheights
}
1087 \func{void
}{InitRowHeights
}{\void}
1089 NB:
{\it never
} access m
\_row/col arrays directly because they are created
1090 on demand,
{\it always
} use accessor functions instead!
1092 Init the m
\_rowHeights/Bottoms arrays with default values.
1096 \membersection{wxGrid::InsertCols
}\label{wxgridinsertcols
}
1098 \func{bool
}{InsertCols
}{\param{int
}{pos =
0},
\param{int
}{numCols =
1},
\param{bool
}{updateLabels = true
}}
1100 Inserts one or more new columns into a grid with the first new column at the
1101 specified position and returns true if successful. The updateLabels argument is not
1104 The sequence of actions begins with the grid object requesting the underlying grid
1105 table to insert new columns. If this is successful the table notifies the grid and the
1106 grid updates the display. For a default grid (one where you have called
1107 \helpref{wxGrid::CreateGrid
}{wxgridcreategrid
}) this process is automatic. If you are
1108 using a custom grid table (specified with
\helpref{wxGrid::SetTable
}{wxgridsettable
})
1109 then you must override
1110 \helpref{wxGridTableBase::InsertCols
}{wxgridtablebaseinsertcols
} in your derived
1115 \membersection{wxGrid::InsertRows
}\label{wxgridinsertrows
}
1117 \func{bool
}{InsertRows
}{\param{int
}{pos =
0},
\param{int
}{numRows =
1},
\param{bool
}{updateLabels = true
}}
1119 Inserts one or more new rows into a grid with the first new row at the specified
1120 position and returns true if successful. The updateLabels argument is not used at
1123 The sequence of actions begins with the grid object requesting the underlying grid
1124 table to insert new rows. If this is successful the table notifies the grid and the
1125 grid updates the display. For a default grid (one where you have called
1126 \helpref{wxGrid::CreateGrid
}{wxgridcreategrid
}) this process is automatic. If you are
1127 using a custom grid table (specified with
\helpref{wxGrid::SetTable
}{wxgridsettable
})
1128 then you must override
1129 \helpref{wxGridTableBase::InsertRows
}{wxgridtablebaseinsertrows
} in your derived
1134 \membersection{wxGrid::IsCellEditControlEnabled
}\label{wxgridiscelleditcontrolenabled
}
1136 \constfunc{bool
}{IsCellEditControlEnabled
}{\void}
1138 Returns true if the in-place edit control is currently enabled.
1142 \membersection{wxGrid::IsCurrentCellReadOnly
}\label{wxgridiscurrentcellreadonly
}
1144 \constfunc{bool
}{IsCurrentCellReadOnly
}{\void}
1146 Returns true if the current cell has been set to read-only
1147 (see
\helpref{wxGrid::SetReadOnly
}{wxgridsetreadonly
}).
1151 \membersection{wxGrid::IsEditable
}\label{wxgridiseditable
}
1153 \func{bool
}{IsEditable
}{\void}
1155 Returns false if the whole grid has been set as read-only or true otherwise.
1156 See
\helpref{wxGrid::EnableEditing
}{wxgridenableediting
} for more information about
1157 controlling the editing status of grid cells.
1161 \membersection{wxGrid::IsInSelection
}\label{wxgridisinselection
}
1163 \constfunc{bool
}{IsInSelection
}{\param{int
}{row
},
\param{int
}{col
}}
1165 \constfunc{bool
}{IsInSelection
}{\param{const wxGridCellCoords\&
}{coords
}}
1167 Is this cell currently selected.
1171 \membersection{wxGrid::IsReadOnly
}\label{wxgridisreadonly
}
1173 \constfunc{bool
}{IsReadOnly
}{\param{int
}{row
},
\param{int
}{col
}}
1175 Returns true if the cell at the specified location can't be edited.
1176 See also
\helpref{wxGrid::IsReadOnly
}{wxgridisreadonly
}.
1180 \membersection{wxGrid::IsSelection
}\label{wxgridisselection
}
1182 \func{bool
}{IsSelection
}{\void}
1184 Returns true if there are currently rows, columns or blocks of cells selected.
1188 \membersection{wxGrid::IsVisible
}\label{wxgridisvisible
}
1190 \func{bool
}{IsVisible
}{\param{int
}{row
},
\param{int
}{col
},
\param{bool
}{wholeCellVisible = true
}}
1192 \func{bool
}{IsVisible
}{\param{const wxGridCellCoords\&
}{coords
},
\param{bool
}{wholeCellVisible = true
}}
1194 Returns true if a cell is either wholly visible (the default) or at least partially
1195 visible in the grid window.
1199 \membersection{wxGrid::MakeCellVisible
}\label{wxgridmakecellvisible
}
1201 \func{void
}{MakeCellVisible
}{\param{int
}{row
},
\param{int
}{col
}}
1203 \func{void
}{MakeCellVisible
}{\param{const wxGridCellCoords\&
}{coords
}}
1205 Brings the specified cell into the visible grid cell area with minimal scrolling. Does
1206 nothing if the cell is already visible.
1210 \membersection{wxGrid::MoveCursorDown
}\label{wxgridmovecursordown
}
1212 \func{bool
}{MoveCursorDown
}{\param{bool
}{expandSelection
}}
1214 Moves the grid cursor down by one row. If a block of cells was previously selected it
1215 will expand if the argument is true or be cleared if the argument is false.
1217 \wxheading{Keyboard
}\\
1218 This function is called for Down cursor key presses or Shift+Down to expand a selection.
1222 \membersection{wxGrid::MoveCursorLeft
}\label{wxgridmovecursorleft
}
1224 \func{bool
}{MoveCursorLeft
}{\param{bool
}{expandSelection
}}
1226 Moves the grid cursor left by one column. If a block of cells was previously selected it
1227 will expand if the argument is true or be cleared if the argument is false.
1229 \wxheading{Keyboard
}\\
1230 This function is called for Left cursor key presses or Shift+Left to expand a selection.
1234 \membersection{wxGrid::MoveCursorRight
}\label{wxgridmovecursorright
}
1236 \func{bool
}{MoveCursorRight
}{\param{bool
}{expandSelection
}}
1238 Moves the grid cursor right by one column. If a block of cells was previously selected it
1239 will expand if the argument is true or be cleared if the argument is false.
1241 \wxheading{Keyboard
}\\
1242 This function is called for Right cursor key presses or Shift+Right to expand a selection.
1246 \membersection{wxGrid::MoveCursorUp
}\label{wxgridmovecursorup
}
1248 \func{bool
}{MoveCursorUp
}{\param{bool
}{expandSelection
}}
1250 Moves the grid cursor up by one row. If a block of cells was previously selected it
1251 will expand if the argument is true or be cleared if the argument is false.
1253 \wxheading{Keyboard
}\\
1254 This function is called for Up cursor key presses or Shift+Up to expand a selection.
1258 \membersection{wxGrid::MoveCursorDownBlock
}\label{wxgridmovecursordownblock
}
1260 \func{bool
}{MoveCursorDownBlock
}{\param{bool
}{expandSelection
}}
1262 Moves the grid cursor down in the current column such that it skips to the beginning or
1263 end of a block of non-empty cells. If a block of cells was previously selected it
1264 will expand if the argument is true or be cleared if the argument is false.
1266 \wxheading{Keyboard
}\\
1267 This function is called for the Ctrl+Down key combination. Shift+Ctrl+Down expands a selection.
1271 \membersection{wxGrid::MoveCursorLeftBlock
}\label{wxgridmovecursorleftblock
}
1273 \func{bool
}{MoveCursorLeftBlock
}{\param{bool
}{expandSelection
}}
1275 Moves the grid cursor left in the current row such that it skips to the beginning or
1276 end of a block of non-empty cells. If a block of cells was previously selected it
1277 will expand if the argument is true or be cleared if the argument is false.
1279 \wxheading{Keyboard
}\\
1280 This function is called for the Ctrl+Left key combination. Shift+Ctrl+left expands a selection.
1284 \membersection{wxGrid::MoveCursorRightBlock
}\label{wxgridmovecursorrightblock
}
1286 \func{bool
}{MoveCursorRightBlock
}{\param{bool
}{expandSelection
}}
1288 Moves the grid cursor right in the current row such that it skips to the beginning or
1289 end of a block of non-empty cells. If a block of cells was previously selected it
1290 will expand if the argument is true or be cleared if the argument is false.
1292 \wxheading{Keyboard
}\\
1293 This function is called for the Ctrl+Right key combination. Shift+Ctrl+Right expands a selection.
1297 \membersection{wxGrid::MoveCursorUpBlock
}\label{wxgridmovecursorupblock
}
1299 \func{bool
}{MoveCursorUpBlock
}{\param{bool
}{expandSelection
}}
1301 Moves the grid cursor up in the current column such that it skips to the beginning or
1302 end of a block of non-empty cells. If a block of cells was previously selected it
1303 will expand if the argument is true or be cleared if the argument is false.
1305 \wxheading{Keyboard
}\\
1306 This function is called for the Ctrl+Up key combination. Shift+Ctrl+Up expands a selection.
1310 \membersection{wxGrid::MovePageDown
}\label{wxgridmovepagedown
}
1312 \func{bool
}{MovePageDown
}{\void}
1314 Moves the grid cursor down by some number of rows so that the previous bottom visible row
1315 becomes the top visible row.
1317 \wxheading{Keyboard
}\\
1318 This function is called for PgDn keypresses.
1322 \membersection{wxGrid::MovePageUp
}\label{wxgridmovepageup
}
1324 \func{bool
}{MovePageUp
}{\void}
1326 Moves the grid cursor up by some number of rows so that the previous top visible row
1327 becomes the bottom visible row.
1329 \wxheading{Keyboard
}\\
1330 This function is called for PgUp keypresses.
1334 \membersection{wxGrid::RegisterDataType
}\label{wxgridregisterdatatype
}
1336 \func{void
}{RegisterDataType
}{\param{const wxString\&
}{typeName
},
\param{wxGridCellRenderer*
}{renderer
},
\param{wxGridCellEditor*
}{editor
}}
1338 Methods for a registry for mapping data types to Renderers/Editors
1342 \membersection{wxGrid::SaveEditControlValue
}\label{wxgridsaveeditcontrolvalue
}
1344 \func{void
}{SaveEditControlValue
}{\void}
1346 Sets the value of the current grid cell to the current in-place edit control value.
1347 This is called automatically when the grid cursor moves from the current cell to a
1348 new cell. It is also a good idea to call this function when closing a grid since
1349 any edits to the final cell location will not be saved otherwise.
1353 \membersection{wxGrid::SelectAll
}\label{wxgridselectall
}
1355 \func{void
}{SelectAll
}{\void}
1357 Selects all cells in the grid.
1361 \membersection{wxGrid::SelectBlock
}\label{wxgridselectblock
}
1363 \func{void
}{SelectBlock
}{\param{int
}{topRow
},
\param{int
}{leftCol
},
1364 \param{int
}{bottomRow
},
\param{int
}{rightCol
},
\param{bool
}{addToSelected = false
}}
1366 \func{void
}{SelectBlock
}{\param{const wxGridCellCoords\&
}{topLeft
},
1367 \param{const wxGridCellCoords\&
}{bottomRight
},
\param{bool
}{addToSelected = false
}}
1369 Selects a rectangular block of cells. If addToSelected is false then any existing selection will be
1370 deselected; if true the column will be added to the existing selection.
1374 \membersection{wxGrid::SelectCol
}\label{wxgridselectcol
}
1376 \func{void
}{SelectCol
}{\param{int
}{col
},
\param{bool
}{addToSelected = false
}}
1378 Selects the specified column. If addToSelected is false then any existing selection will be
1379 deselected; if true the column will be added to the existing selection.
1383 \membersection{wxGrid::SelectionToDeviceRect
}\label{wxgridselectiontodevicerect
}
1385 \func{wxRect
}{SelectionToDeviceRect
}{\void}
1387 This function returns the rectangle that encloses the selected cells
1388 in device coords and clipped to the client size of the grid window.
1392 \membersection{wxGrid::SelectRow
}\label{wxgridselectrow
}
1394 \func{void
}{SelectRow
}{\param{int
}{row
},
\param{bool
}{addToSelected = false
}}
1396 Selects the specified row. If addToSelected is false then any existing selection will be
1397 deselected; if true the row will be added to the existing selection.
1401 \membersection{wxGrid::SetCellAlignment
}\label{wxgridsetcellalignment
}
1403 \func{void
}{SetCellAlignment
}{\param{int
}{row
},
\param{int
}{col
},
\param{int
}{horiz
},
\param{int
}{vert
}}
1405 \func{void
}{SetCellAlignment
}{\param{int
}{align
},
\param{int
}{row
},
\param{int
}{col
}}
1407 Sets the horizontal and vertical alignment for grid cell text at the specified location.
1409 Horizontal alignment should be one of wxALIGN
\_LEFT, wxALIGN
\_CENTRE or wxALIGN
\_RIGHT. \\
1410 Vertical alignment should be one of wxALIGN
\_TOP, wxALIGN
\_CENTRE or wxALIGN
\_BOTTOM.
1414 \membersection{wxGrid::SetCellBackgroundColour
}\label{wxgridsetcellbackgroundcolour
}
1416 \func{void
}{SetCellBackgroundColour
}{\param{int
}{row
},
\param{int
}{col
},
\param{const wxColour\&
}{ colour
}}
1420 \membersection{wxGrid::SetCellEditor
}\label{wxgridsetcelleditor
}
1422 \func{void
}{SetCellEditor
}{\param{int
}{row
},
\param{int
}{col
},
\param{wxGridCellEditor*
}{editor
}}
1424 Sets the editor for the grid cell at the specified location.
1425 The grid will take ownership of the pointer.
1427 See
\helpref{wxGridCellEditor
}{wxgridcelleditor
} and
1428 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
1432 \membersection{wxGrid::SetCellFont
}\label{wxgridsetcellfont
}
1434 \func{void
}{SetCellFont
}{\param{int
}{row
},
\param{int
}{col
},
\param{const wxFont\&
}{ font
}}
1436 Sets the font for text in the grid cell at the specified location.
1440 \membersection{wxGrid::SetCellRenderer
}\label{wxgridsetcellrenderer
}
1442 \func{void
}{SetCellRenderer
}{\param{int
}{row
},
\param{int
}{col
},
\param{wxGridCellRenderer*
}{renderer
}}
1444 Sets the renderer for the grid cell at the specified location.
1445 The grid will take ownership of the pointer.
1447 See
\helpref{wxGridCellRenderer
}{wxgridcellrenderer
} and
1448 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
1452 \membersection{wxGrid::SetCellTextColour
}\label{wxgridsetcelltextcolour
}
1454 \func{void
}{SetCellTextColour
}{\param{int
}{row
},
\param{int
}{col
},
\param{const wxColour\&
}{ colour
}}
1456 \func{void
}{SetCellTextColour
}{\param{const wxColour\&
}{val
},
\param{int
}{row
},
\param{int
}{col
}}
1458 \func{void
}{SetCellTextColour
}{\param{const wxColour\&
}{colour
}}
1460 Sets the text colour for the grid cell at the specified location.
1464 \membersection{wxGrid::SetCellValue
}\label{wxgridsetcellvalue
}
1466 \func{void
}{SetCellValue
}{\param{int
}{row
},
\param{int
}{col
},
\param{const wxString\&
}{s
}}
1468 \func{void
}{SetCellValue
}{\param{const wxGridCellCoords\&
}{coords
},
\param{const wxString\&
}{s
}}
1470 \func{void
}{SetCellValue
}{\param{const wxString\&
}{val
},
\param{int
}{row
},
\param{int
}{col
}}
1472 Sets the string value for the cell at the specified location. For simple applications where a
1473 grid object automatically uses a default grid table of string values you use this function together
1474 with
\helpref{wxGrid::GetCellValue
}{wxgridgetcellvalue
} to access cell values.
1476 For more complex applications where you have derived your own grid table class that contains
1477 various data types (e.g. numeric, boolean or user-defined custom types) then you only use this
1478 function for those cells that contain string values.
1480 The last form is for backward compatibility only.
1482 See
\helpref{wxGridTableBase::CanSetValueAs
}{wxgridtablebasecangetvalueas
}
1483 and the
\helpref{wxGrid overview
}{gridoverview
} for more information.
1487 \membersection{wxGrid::SetColAttr
}\label{wxgridsetcolattr
}
1489 \func{void
}{SetColAttr
}{\param{int
}{col
},
\param{wxGridCellAttr*
}{attr
}}
1491 Sets the cell attributes for all cells in the specified column.
1493 For more information about controlling grid cell attributes see the
1494 \helpref{wxGridCellAttr
}{wxgridcellattr
} cell attribute class and the
1495 \helpref{wxGrid classes overview
}{gridoverview
}.
1499 \membersection{wxGrid::SetColFormatBool
}\label{wxgridsetcolformatbool
}
1501 \func{void
}{SetColFormatBool
}{\param{int
}{col
}}
1503 Sets the specified column to display boolean values. wxGrid displays boolean values with a checkbox.
1507 \membersection{wxGrid::SetColFormatNumber
}\label{wxgridsetcolformatnumber
}
1509 \func{void
}{SetColFormatNumber
}{\param{int
}{col
}}
1511 Sets the specified column to display integer values.
1515 \membersection{wxGrid::SetColFormatFloat
}\label{wxgridsetcolformatfloat
}
1517 \func{void
}{SetColFormatFloat
}{\param{int
}{col
},
\param{int
}{width = -
1},
\param{int
}{precision = -
1}}
1519 Sets the specified column to display floating point values with the given width and precision.
1523 \membersection{wxGrid::SetColFormatCustom
}\label{wxgridsetcolformatcustom
}
1525 \func{void
}{SetColFormatCustom
}{\param{int
}{col
},
\param{const wxString\&
}{typeName
}}
1527 Sets the specified column to display data in a custom format.
1528 See the
\helpref{wxGrid overview
}{gridoverview
} for more information on working
1529 with custom data types.
1533 \membersection{wxGrid::SetColLabelAlignment
}\label{wxgridsetcollabelalignment
}
1535 \func{void
}{SetColLabelAlignment
}{\param{int
}{horiz
},
\param{int
}{vert
}}
1537 Sets the horizontal and vertical alignment of column label text.
1539 Horizontal alignment should be one of wxALIGN
\_LEFT, wxALIGN
\_CENTRE or wxALIGN
\_RIGHT.
1541 Vertical alignment should be one of wxALIGN
\_TOP, wxALIGN
\_CENTRE or wxALIGN
\_BOTTOM.
1545 \membersection{wxGrid::SetColLabelSize
}\label{wxgridsetcollabelsize
}
1547 \func{void
}{SetColLabelSize
}{\param{int
}{height
}}
1549 Sets the height of the column labels.
1553 \membersection{wxGrid::SetColLabelValue
}\label{wxgridsetcollabelvalue
}
1555 \func{void
}{SetColLabelValue
}{\param{int
}{col
},
\param{const wxString\&
}{ value
}}
1557 Set the value for the given column label. If you are using a derived grid table you must
1558 override
\helpref{wxGridTableBase::SetColLabelValue
}{wxgridtablebasesetcollabelvalue
}
1559 for this to have any effect.
1563 \membersection{wxGrid::SetColMinimalWidth
}\label{wxgridsetcolminimalwidth
}
1565 \func{void
}{SetColMinimalWidth
}{\param{int
}{col
},
\param{int
}{width
}}
1567 Sets the minimal width for the specified column. This should normally be called when creating the grid
1568 because it will not resize a column that is already narrower than the minimal width.
1569 The width argument must be higher than the minimimal acceptable column width, see
1570 \helpref{wxGrid::GetColMinimalAcceptableWidth
}{wxgridgetcolminimalacceptablewidth
}.
1574 \membersection{wxGrid::SetColMinimalAcceptableWidth
}\label{wxgridsetcolminimalacceptablewidth
}
1576 \func{void
}{SetColMinimalAcceptableWidth
}{\param{int
}{width
}}
1578 This modifies the minimum column width that can be handled correctly. Specifying a low value here
1579 allows smaller grid cells to be dealt with correctly. Specifying a value here which is much smaller
1580 than the actual minimum size will incur a performance penalty in the functions which perform
1581 grid cell index lookup on the basis of screen coordinates.
1582 This should normally be called when creating the grid because it will not resize existing columns
1583 with sizes smaller than the value specified here.
1587 \membersection{wxGrid::SetColPos
}\label{wxgridsetcolpos
}
1589 \func{void
}{SetColPos
}{\param{int
}{colID
},
\param{int
}{newPos
}}
1591 Sets the position of the specified column.
1595 \membersection{wxGrid::SetColSize
}\label{wxgridsetcolsize
}
1597 \func{void
}{SetColSize
}{\param{int
}{col
},
\param{int
}{width
}}
1599 Sets the width of the specified column.
1601 This function does not refresh the grid. If you are calling it outside of a BeginBatch / EndBatch
1602 block you can use
\helpref{wxGrid::ForceRefresh
}{wxgridforcerefresh
} to see the changes.
1604 Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will
1605 also be set as the minimal width for the column.
1608 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
1609 The memory requirements for this could become prohibitive if your grid is very large.
1613 \membersection{wxGrid::SetDefaultCellAlignment
}\label{wxgridsetdefaultcellalignment
}
1615 \func{void
}{SetDefaultCellAlignment
}{\param{int
}{horiz
},
\param{int
}{vert
}}
1617 Sets the default horizontal and vertical alignment for grid cell text.
1619 Horizontal alignment should be one of wxALIGN
\_LEFT, wxALIGN
\_CENTRE or wxALIGN
\_RIGHT.
1621 Vertical alignment should be one of wxALIGN
\_TOP, wxALIGN
\_CENTRE or wxALIGN
\_BOTTOM.
1625 \membersection{wxGrid::SetDefaultCellBackgroundColour
}\label{wxgridsetdefaultcellbackgroundcolour
}
1627 \func{void
}{SetDefaultCellBackgroundColour
}{\param{const wxColour\&
}{ colour
}}
1629 Sets the default background colour for grid cells.
1633 \membersection{wxGrid::SetDefaultCellFont
}\label{wxgridsetdefaultcellfont
}
1635 \func{void
}{SetDefaultCellFont
}{\param{const wxFont\&
}{ font
}}
1637 Sets the default font to be used for grid cell text.
1641 \membersection{wxGrid::SetDefaultCellTextColour
}\label{wxgridsetdefaultcelltextcolour
}
1643 \func{void
}{SetDefaultCellTextColour
}{\param{const wxColour\&
}{ colour
}}
1645 Sets the current default colour for grid cell text.
1649 \membersection{wxGrid::SetDefaultEditor
}\label{wxgridsetdefaulteditor
}
1651 \func{void
}{SetDefaultEditor
}{\param{wxGridCellEditor*
}{editor
}}
1653 Sets the default editor for grid cells. The grid will take ownership of the pointer.
1655 See
\helpref{wxGridCellEditor
}{wxgridcelleditor
} and
1656 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
1660 \membersection{wxGrid::SetDefaultRenderer
}\label{wxgridsetdefaultrenderer
}
1662 \func{void
}{SetDefaultRenderer
}{\param{wxGridCellRenderer*
}{renderer
}}
1664 Sets the default renderer for grid cells. The grid will take ownership of the pointer.
1666 See
\helpref{wxGridCellRenderer
}{wxgridcellrenderer
} and
1667 the
\helpref{wxGrid overview
}{gridoverview
} for more information about cell editors and renderers.
1671 \membersection{wxGrid::SetDefaultColSize
}\label{wxgridsetdefaultcolsize
}
1673 \func{void
}{SetDefaultColSize
}{\param{int
}{width
},
\param{bool
}{resizeExistingCols = false
}}
1675 Sets the default width for columns in the grid. This will only affect columns subsequently added to
1676 the grid unless resizeExistingCols is true.
1680 \membersection{wxGrid::SetDefaultRowSize
}\label{wxgridsetdefaultrowsize
}
1682 \func{void
}{SetDefaultRowSize
}{\param{int
}{height
},
\param{bool
}{resizeExistingRows = false
}}
1684 Sets the default height for rows in the grid. This will only affect rows subsequently added
1685 to the grid unless resizeExistingRows is true.
1689 \membersection{wxGrid::SetGridCursor
}\label{wxgridsetgridcursor
}
1691 \func{void
}{SetGridCursor
}{\param{int
}{row
},
\param{int
}{col
}}
1693 Set the grid cursor to the specified cell.
1694 This function calls
\helpref{wxGrid::MakeCellVisible
}{wxgridmakecellvisible
}.
1698 \membersection{wxGrid::SetGridLineColour
}\label{wxgridsetgridlinecolour
}
1700 \func{void
}{SetGridLineColour
}{\param{const wxColour\&
}{colour
}}
1702 Sets the colour used to draw grid lines.
1706 \membersection{wxGrid::SetLabelBackgroundColour
}\label{wxgridsetlabelbackgroundcolour
}
1708 \func{void
}{SetLabelBackgroundColour
}{\param{const wxColour\&
}{ colour
}}
1710 Sets the background colour for row and column labels.
1714 \membersection{wxGrid::SetLabelFont
}\label{wxgridsetlabelfont
}
1716 \func{void
}{SetLabelFont
}{\param{const wxFont\&
}{ font
}}
1718 Sets the font for row and column labels.
1722 \membersection{wxGrid::SetLabelTextColour
}\label{wxgridsetlabeltextcolour
}
1724 \func{void
}{SetLabelTextColour
}{\param{const wxColour\&
}{ colour
}}
1726 Sets the colour for row and column label text.
1730 \membersection{wxGrid::SetMargins
}\label{wxgridsetmargins
}
1732 \func{void
}{SetMargins
}{\param{int
}{extraWidth
},
\param{int
}{extraHeight
}}
1734 A grid may occupy more space than needed for its rows/columns. This
1735 function allows to set how big this extra space is
1739 \membersection{wxGrid::SetOrCalcColumnSizes
}\label{wxgridsetorcalccolumnsizes
}
1741 \func{int
}{SetOrCalcColumnSizes
}{\param{bool
}{calcOnly
},
\param{bool
}{setAsMin = true
}}
1743 Common part of AutoSizeColumn/Row() and GetBestSize()
1747 \membersection{wxGrid::SetOrCalcRowSizes
}\label{wxgridsetorcalcrowsizes
}
1749 \func{int
}{SetOrCalcRowSizes
}{\param{bool
}{calcOnly
},
\param{bool
}{setAsMin = true
}}
1753 \membersection{wxGrid::SetReadOnly
}\label{wxgridsetreadonly
}
1755 \func{void
}{SetReadOnly
}{\param{int
}{row
},
\param{int
}{col
},
\param{bool
}{isReadOnly = true
}}
1757 Makes the cell at the specified location read-only or editable.
1758 See also
\helpref{wxGrid::IsReadOnly
}{wxgridisreadonly
}.
1762 \membersection{wxGrid::SetRowAttr
}\label{wxgridsetrowattr
}
1764 \func{void
}{SetRowAttr
}{\param{int
}{row
},
\param{wxGridCellAttr*
}{attr
}}
1766 Sets the cell attributes for all cells in the specified row.
1767 See the
\helpref{wxGridCellAttr
}{wxgridcellattr
} class for more information
1768 about controlling cell attributes.
1772 \membersection{wxGrid::SetRowLabelAlignment
}\label{wxgridsetrowlabelalignment
}
1774 \func{void
}{SetRowLabelAlignment
}{\param{int
}{horiz
},
\param{int
}{vert
}}
1776 Sets the horizontal and vertical alignment of row label text.
1778 Horizontal alignment should be one of wxALIGN
\_LEFT, wxALIGN
\_CENTRE or wxALIGN
\_RIGHT.
1780 Vertical alignment should be one of wxALIGN
\_TOP, wxALIGN
\_CENTRE or wxALIGN
\_BOTTOM.
1784 \membersection{wxGrid::SetRowLabelSize
}\label{wxgridsetrowlabelsize
}
1786 \func{void
}{SetRowLabelSize
}{\param{int
}{width
}}
1788 Sets the width of the row labels.
1792 \membersection{wxGrid::SetRowLabelValue
}\label{wxgridsetrowlabelvalue
}
1794 \func{void
}{SetRowLabelValue
}{\param{int
}{row
},
\param{const wxString\&
}{ value
}}
1796 Set the value for the given row label. If you are using a derived grid table you must
1797 override
\helpref{wxGridTableBase::SetRowLabelValue
}{wxgridtablebasesetrowlabelvalue
}
1798 for this to have any effect.
1802 \membersection{wxGrid::SetRowMinimalHeight
}\label{wxgridsetrowminimalheight
}
1804 \func{void
}{SetRowMinimalHeight
}{\param{int
}{row
},
\param{int
}{height
}}
1806 Sets the minimal height for the specified row. This should normally be called when creating the grid
1807 because it will not resize a row that is already shorter than the minimal height.
1808 The height argument must be higher than the minimimal acceptable row height, see
1809 \helpref{wxGrid::GetRowMinimalAcceptableHeight
}{wxgridgetrowminimalacceptableheight
}.
1813 \membersection{wxGrid::SetRowMinimalAcceptableHeight
}\label{wxgridsetrowminimalacceptableheight
}
1815 \func{void
}{SetRowMinimalAcceptableHeight
}{\param{int
}{height
}}
1817 This modifies the minimum row width that can be handled correctly. Specifying a low value here
1818 allows smaller grid cells to be dealt with correctly. Specifying a value here which is much smaller
1819 than the actual minimum size will incur a performance penalty in the functions which perform
1820 grid cell index lookup on the basis of screen coordinates.
1821 This should normally be called when creating the grid because it will not resize existing rows
1822 with sizes smaller than the value specified here.
1826 \membersection{wxGrid::SetRowSize
}\label{wxgridsetrowsize
}
1828 \func{void
}{SetRowSize
}{\param{int
}{row
},
\param{int
}{height
}}
1830 Sets the height of the specified row.
1832 This function does not refresh the grid. If you are calling it outside of a BeginBatch / EndBatch
1833 block you can use
\helpref{wxGrid::ForceRefresh
}{wxgridforcerefresh
} to see the changes.
1835 Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will
1836 also be set as the minimal width for the column.
1840 wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
1841 The memory requirements for this could become prohibitive if your grid is very large.
1845 \membersection{wxGrid::SetScrollLineX
}\label{wxgridsetscrolllinex
}
1847 \func{void
}{SetScrollLineX
}{\param{int
}{x
}}
1849 Sets the number of pixels per horizontal scroll increment. The default is
15.
1850 Sometimes wxGrid has trouble setting the scrollbars correctly due to rounding
1851 errors: setting this to
1 can help.
1853 \wxheading{See also
}
1855 \helpref{wxGrid::GetScrollLineX
}{wxgridgetscrolllinex
},
\rtfsp
1856 \helpref{wxGrid::GetScrollLineY
}{wxgridgetscrollliney
},
\rtfsp
1857 \helpref{wxGrid::SetScrollLineY
}{wxgridsetscrollliney
}
1861 \membersection{wxGrid::SetScrollLineY
}\label{wxgridsetscrollliney
}
1863 \func{void
}{SetScrollLineY
}{\param{int
}{y
}}
1865 Sets the number of pixels per vertical scroll increment. The default is
15.
1866 Sometimes wxGrid has trouble setting the scrollbars correctly due to rounding
1867 errors: setting this to
1 can help.
1869 \wxheading{See also
}
1871 \helpref{wxGrid::GetScrollLineX
}{wxgridgetscrolllinex
},
\rtfsp
1872 \helpref{wxGrid::GetScrollLineY
}{wxgridgetscrollliney
},
\rtfsp
1873 \helpref{wxGrid::SetScrollLineX
}{wxgridsetscrolllinex
}
1877 \membersection{wxGrid::SetSelectionBackground
}\label{wxgridsetselectionbackground
}
1879 \func{void
}{SetSelectionBackground
}{\param{const wxColour\&
}{c
}}
1883 \membersection{wxGrid::SetSelectionForeground
}\label{wxgridsetselectionforeground
}
1885 \func{void
}{SetSelectionForeground
}{\param{const wxColour\&
}{c
}}
1889 \membersection{wxGrid::SetSelectionMode
}\label{wxgridsetselectionmode
}
1891 \func{void
}{SetSelectionMode
}{\param{wxGrid::wxGridSelectionModes
}{ selmode
}}
1893 Set the selection behaviour of the grid.
1895 \wxheading{Parameters
}
1897 \docparam{wxGrid::wxGridSelectCells
}{The default mode where individual cells are selected.
}
1899 \docparam{wxGrid::wxGridSelectRows
}{Selections will consist of whole rows.
}
1901 \docparam{wxGrid::wxGridSelectColumns
}{Selections will consist of whole columns.
}
1905 \membersection{wxGrid::SetTable
}\label{wxgridsettable
}
1907 \func{bool
}{SetTable
}{\param{wxGridTableBase*
}{table
},
\param{bool
}{takeOwnership = false
},
\param{wxGrid::wxGridSelectionModes
}{selmode = wxGrid::wxGridSelectCells
}}
1909 Passes a pointer to a custom grid table to be used by the grid. This should be called
1910 after the grid constructor and before using the grid object. If takeOwnership is set to
1911 true then the table will be deleted by the wxGrid destructor.
1913 Use this function instead of
\helpref{wxGrid::CreateGrid
}{wxgridcreategrid
} when your
1914 application involves complex or non-string data or data sets that are too large to fit
1919 \membersection{wxGrid::ShowCellEditControl
}\label{wxgridshowcelleditcontrol
}
1921 \func{void
}{ShowCellEditControl
}{\void}
1923 Displays the in-place cell edit control for the current cell.
1927 \membersection{wxGrid::XToCol
}\label{wxgridxtocol
}
1929 \func{int
}{XToCol
}{\param{int
}{x
},
\param{bool
}{clipToMinMax = false
}}
1931 \wxheading{Parameters
}
1932 \docparam{x
}{The x position to evaluate.
}
1933 \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.
}
1935 \wxheading{Return value
}
1936 The grid column that corresponds to the logical x coordinate. Returns
1937 {\tt wxNOT
\_FOUND} if there is no column at the x position.
1941 \membersection{wxGrid::XToEdgeOfCol
}\label{wxgridxtoedgeofcol
}
1943 \func{int
}{XToEdgeOfCol
}{\param{int
}{x
}}
1945 Returns the column whose right hand edge is close to the given logical x position.
1946 If no column edge is near to this position
{\tt wxNOT
\_FOUND} is returned.
1950 \membersection{wxGrid::YToEdgeOfRow
}\label{wxgridytoedgeofrow
}
1952 \func{int
}{YToEdgeOfRow
}{\param{int
}{y
}}
1954 Returns the row whose bottom edge is close to the given logical y position.
1955 If no row edge is near to this position
{\tt wxNOT
\_FOUND} is returned.
1959 \membersection{wxGrid::YToRow
}\label{wxgridytorow
}
1961 \func{int
}{YToRow
}{\param{int
}{y
}}
1963 Returns the grid row that corresponds to the logical y coordinate. Returns
1964 {\tt wxNOT
\_FOUND} if there is no row at the y position.