2005-11-02 16:52:23 +00:00
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: grid.tex
%% Purpose: wxGrid
%% Author:
2006-06-01 00:13:19 +00:00
%% Modified by: Santiago Palacios
2005-11-02 16:52:23 +00:00
%% Created:
%% RCS-ID: $Id$
%% Copyright: (c) wxWidgets
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1998-05-20 14:25:30 +00:00
\section { \class { wxGrid} } \label { wxgrid}
2000-07-21 08:24:18 +00:00
wxGrid and its related classes are used for displaying and editing tabular
2000-09-10 19:01:03 +00:00
data. They provide a rich set of features for display, editing, and
2000-07-21 08:24:18 +00:00
interacting with a variety of data sources. For simple applications, and to
help you get started, wxGrid is the only class you need to refer to
2000-09-10 19:01:03 +00:00
directly. It will set up default instances of the other classes and manage
them for you. For more complex applications you can derive your own
2000-07-21 08:24:18 +00:00
classes for custom grid views, grid data tables, cell editors and
2000-09-10 19:01:03 +00:00
renderers. The \helpref { wxGrid classes overview} { gridoverview} has
2000-07-21 08:24:18 +00:00
examples of simple and more complex applications, explains the
relationship between the various grid classes and has a summary of the
keyboard shortcuts and mouse functions provided by wxGrid.
2004-05-04 08:27:20 +00:00
wxGrid has been greatly expanded and redesigned for wxWidgets 2.2
2000-07-21 08:24:18 +00:00
onwards. If you have been using the old wxGrid class you will probably
2000-09-10 19:01:03 +00:00
want to have a look at the \helpref { wxGrid classes overview} { gridoverview} to see
how things have changed. The new grid classes are reasonably backward-compatible
but there are some exceptions. There are also easier ways of doing many things compared to
2005-11-02 16:52:23 +00:00
the previous implementation.
1998-05-20 14:25:30 +00:00
\wxheading { Derived from}
2000-07-21 08:24:18 +00:00
\helpref { wxScrolledWindow} { wxscrolledwindow} \\
1998-05-20 14:25:30 +00:00
\helpref { wxWindow} { wxwindow} \\
\helpref { wxEvtHandler} { wxevthandler} \\
\helpref { wxObject} { wxobject}
1999-02-15 20:41:29 +00:00
\wxheading { Include files}
<wx/grid.h>
1998-05-20 14:25:30 +00:00
\wxheading { Window styles}
2000-07-21 08:24:18 +00:00
There are presently no specific window styles for wxGrid.
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\wxheading { Event handling}
1998-05-20 14:25:30 +00:00
2001-12-23 21:26:11 +00:00
\input gridevt.inc
2005-11-02 16:52:23 +00:00
The event handler for the following functions takes a
2001-12-23 21:26:11 +00:00
\helpref { wxGridSizeEvent} { wxgridsizeevent} parameter.
2004-06-13 23:17:00 +00:00
The ...\_ CMD\_ ... variants also take a window identifier.
2001-12-23 21:26:11 +00:00
\twocolwidtha { 7cm}
\begin { twocollist} \itemsep =0pt
\twocolitem { { \bf EVT\_ GRID\_ COL\_ SIZE(func)} } { The user resized a column by dragging it. Processes a wxEVT\_ GRID\_ COL\_ SIZE.}
\twocolitem { { \bf EVT\_ GRID\_ ROW\_ SIZE(func)} } { The user resized a row by dragging it. Processes a wxEVT\_ GRID\_ ROW\_ SIZE.}
2004-06-13 23:17:00 +00:00
\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.}
\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.}
2001-12-23 21:26:11 +00:00
\end { twocollist} %
2005-11-02 16:52:23 +00:00
The event handler for the following functions takes a
2001-12-23 21:26:11 +00:00
\helpref { wxGridRangeSelectEvent} { wxgridrangeselectevent} parameter.
2004-06-13 23:17:00 +00:00
The ...\_ CMD\_ ... variant also takes a window identifier.
2001-12-23 21:26:11 +00:00
\twocolwidtha { 7cm}
\begin { twocollist} \itemsep =0pt
\twocolitem { { \bf EVT\_ GRID\_ RANGE\_ SELECT(func)} } { The user selected a group of contiguous cells. Processes a wxEVT\_ GRID\_ RANGE\_ SELECT.}
2004-06-13 23:17:00 +00:00
\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.}
2001-12-23 21:26:11 +00:00
\end { twocollist} %
2005-11-02 16:52:23 +00:00
The event handler for the following functions takes a
2001-12-23 21:26:11 +00:00
\helpref { wxGridEditorCreatedEvent} { wxgrideditorcreatedevent} parameter.
2004-06-13 23:17:00 +00:00
The ...\_ CMD\_ ... variant also takes a window identifier.
2001-12-23 21:26:11 +00:00
\twocolwidtha { 7cm}
\begin { twocollist} \itemsep =0pt
\twocolitem { { \bf EVT\_ GRID\_ EDITOR\_ CREATED(func)} } { The editor for a cell was created. Processes a wxEVT\_ GRID\_ EDITOR\_ CREATED.}
2004-06-13 23:17:00 +00:00
\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.}
2001-12-23 21:26:11 +00:00
\end { twocollist} %
1998-05-20 14:25:30 +00:00
\wxheading { See also}
2000-07-21 08:24:18 +00:00
\helpref { wxGrid overview} { gridoverview}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
%%%%%%%%%%% FUNCTION GROUPS %%%%%%%%%%%%%
\latexignore { \rtfignore { \wxheading { Function groups} } }
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2004-09-29 11:25:34 +00:00
\membersection { Constructors and initialization} \label { wxgridconstructors}
1998-05-20 14:25:30 +00:00
2000-09-10 19:01:03 +00:00
\helpref { wxGrid} { wxgridctor} \\
\helpref { \destruct { wxGrid} } { wxgriddtor} \\
\helpref { CreateGrid} { wxgridcreategrid} \\
2000-07-21 08:24:18 +00:00
\helpref { SetTable} { wxgridsettable}
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2004-09-29 11:25:34 +00:00
\membersection { Display format} \label { wxgriddisplayformat}
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2004-09-29 11:25:34 +00:00
\membersection { Selection functions} \label { wxgridselectionfunctions}
1998-05-20 14:25:30 +00:00
2000-09-10 19:01:03 +00:00
\helpref { wxGrid::ClearSelection} { wxgridclearselection} \\
\helpref { wxGrid::IsSelection} { wxgridisselection} \\
\helpref { wxGrid::SelectAll} { wxgridselectall} \\
\helpref { wxGrid::SelectBlock} { wxgridselectblock} \\
\helpref { wxGrid::SelectCol} { wxgridselectcol} \\
2000-07-27 01:29:07 +00:00
\helpref { wxGrid::SelectRow} { wxgridselectrow}
2000-07-21 08:24:18 +00:00
%%%%%%%%% MEMBER FUNCTIONS %%%%%%%%%%
\helponly { \insertatlevel { 2} {
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\wxheading { Members}
} }
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::wxGrid} \label { wxgridctor}
\func { } { wxGrid} { \void }
Default constructor
\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} }
2005-11-02 16:52:23 +00:00
Constructor to create a grid object. Call either \helpref { wxGrid::CreateGrid} { wxgridcreategrid} or
2000-07-21 08:24:18 +00:00
\helpref { wxGrid::SetTable} { wxgridsettable} directly after this to initialize the grid before using
2005-11-02 16:52:23 +00:00
it.
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::\destruct { wxGrid} } \label { wxgriddtor}
\func { } { \destruct { wxGrid} } { \void }
Destructor. This will also destroy the associated grid table unless you passed a table
object to the grid and specified that the grid should not take ownership of the
2005-11-02 16:52:23 +00:00
table (see \helpref { wxGrid::SetTable} { wxgridsettable} ).
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::AppendCols} \label { wxgridappendcols}
2003-01-18 00:16:34 +00:00
\func { bool} { AppendCols} { \param { int } { numCols = 1} , \param { bool } { updateLabels = true} }
2000-07-21 08:24:18 +00:00
2003-01-18 00:16:34 +00:00
Appends one or more new columns to the right of the grid and returns true if
2000-07-21 08:24:18 +00:00
successful. The updateLabels argument is not used at present.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
If you are using a derived grid table class you will need to override
\helpref { wxGridTableBase::AppendCols} { wxgridtablebaseappendcols} . See
\helpref { wxGrid::InsertCols} { wxgridinsertcols} for further information.
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::AppendRows} \label { wxgridappendrows}
2003-01-18 00:16:34 +00:00
\func { bool} { AppendRows} { \param { int } { numRows = 1} , \param { bool } { updateLabels = true} }
2000-07-21 08:24:18 +00:00
2003-01-18 00:16:34 +00:00
Appends one or more new rows to the bottom of the grid and returns true if
2000-07-21 08:24:18 +00:00
successful. The updateLabels argument is not used at present.
2005-11-02 16:52:23 +00:00
If you are using a derived grid table class you will need to override
\helpref { wxGridTableBase::AppendRows} { wxgridtablebaseappendrows} . See
\helpref { wxGrid::InsertRows} { wxgridinsertrows} for further information.
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::AutoSize} \label { wxgridautosize}
\func { void} { AutoSize} { \void }
Automatically sets the height and width of all rows and columns to fit their contents.
2000-09-10 19:01:03 +00:00
\wxheading { Note} \\
2000-07-21 08:24:18 +00:00
wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
2005-11-02 16:52:23 +00:00
The memory requirements for this could become prohibitive if your grid is very large.
1998-05-20 14:25:30 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::AutoSizeColOrRow} \label { wxgridautosizecolorrow}
\func { void} { AutoSizeColOrRow} { \param { int } { n} , \param { bool } { setAsMin} , \param { bool } { column} }
2005-11-02 16:52:23 +00:00
Common part of AutoSizeColumn/Row() or row?
2004-10-14 10:28:20 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::AutoSizeColumn} \label { wxgridautosizecolumn}
2003-01-18 00:16:34 +00:00
\func { void} { AutoSizeColumn} { \param { int } { col} , \param { bool } { setAsMin = true} }
2000-07-21 08:24:18 +00:00
2003-01-18 00:16:34 +00:00
Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will
2000-07-21 08:24:18 +00:00
also be set as the minimal width for the column.
2000-09-10 19:01:03 +00:00
\wxheading { Note} \\
2000-07-21 08:24:18 +00:00
wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
2005-11-02 16:52:23 +00:00
The memory requirements for this could become prohibitive if your grid is very large.
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::AutoSizeColumns} \label { wxgridautosizecolumns}
2003-01-18 00:16:34 +00:00
\func { void} { AutoSizeColumns} { \param { bool } { setAsMin = true} }
2000-07-21 08:24:18 +00:00
2003-01-18 00:16:34 +00:00
Automatically sizes all columns to fit their contents. If setAsMin is true the calculated widths will
2000-07-21 08:24:18 +00:00
also be set as the minimal widths for the columns.
2000-09-10 19:01:03 +00:00
\wxheading { Note} \\
2000-07-21 08:24:18 +00:00
wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
2005-11-02 16:52:23 +00:00
The memory requirements for this could become prohibitive if your grid is very large.
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::AutoSizeRow} \label { wxgridautosizerow}
2003-01-18 00:16:34 +00:00
\func { void} { AutoSizeRow} { \param { int } { row} , \param { bool } { setAsMin = true} }
2000-07-21 08:24:18 +00:00
2003-01-18 00:16:34 +00:00
Automatically sizes the row to fit its contents. If setAsMin is true the calculated height will
2000-07-21 08:24:18 +00:00
also be set as the minimal height for the row.
2000-09-10 19:01:03 +00:00
\wxheading { Note} \\
2000-07-21 08:24:18 +00:00
wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
2005-11-02 16:52:23 +00:00
The memory requirements for this could become prohibitive if your grid is very large.
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::AutoSizeRows} \label { wxgridautosizerows}
2003-01-18 00:16:34 +00:00
\func { void} { AutoSizeRows} { \param { bool } { setAsMin = true} }
2000-07-21 08:24:18 +00:00
2003-01-18 00:16:34 +00:00
Automatically sizes all rows to fit their contents. If setAsMin is true the calculated heights will
2000-07-21 08:24:18 +00:00
also be set as the minimal heights for the rows.
2000-09-10 19:01:03 +00:00
\wxheading { Note} \\
2000-07-21 08:24:18 +00:00
wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
2005-11-02 16:52:23 +00:00
The memory requirements for this could become prohibitive if your grid is very large.
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::BeginBatch} \label { wxgridbeginbatch}
\func { void} { BeginBatch} { \void }
2000-07-21 08:24:18 +00:00
Increments the grid's batch count. When the count is greater than zero repainting of
2005-11-02 16:52:23 +00:00
the grid is suppressed. Each call to BeginBatch must be matched by a later call to
2000-07-21 08:24:18 +00:00
\helpref { wxGrid::EndBatch} { wxgridendbatch} . Code that does a lot of grid
modification can be enclosed between BeginBatch and EndBatch calls to avoid
screen flicker. The final EndBatch will cause the grid to be repainted.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::BlockToDeviceRect} \label { wxgridblocktodevicerect}
\func { wxRect} { BlockToDeviceRect} { \param { const wxGridCellCoords \& } { topLeft} , \param { const wxGridCellCoords \& } { bottomRight} }
This function returns the rectangle that encloses the block of cells
limited by TopLeft and BottomRight cell in device coords and clipped
to the client size of the grid window.
2005-11-02 16:52:23 +00:00
2006-06-01 00:13:19 +00:00
\membersection { wxGrid::CanDragColMove} \label { wxgridcandragcolmove}
\func { bool} { CanDragColMove} { \void }
Returns true if columns can be moved by dragging with the mouse. Columns can be moved
by dragging on their labels.
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::CanDragColSize} \label { wxgridcandragcolsize}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { bool} { CanDragColSize} { \void }
1998-05-20 14:25:30 +00:00
2003-01-18 00:16:34 +00:00
Returns true if columns can be resized by dragging with the mouse. Columns can be resized
2000-07-21 08:24:18 +00:00
by dragging the edges of their labels. If grid line dragging is enabled they can also be
2005-11-02 16:52:23 +00:00
resized by dragging the right edge of the column in the grid cell area
2000-07-21 08:24:18 +00:00
(see \helpref { wxGrid::EnableDragGridSize} { wxgridenabledraggridsize} ).
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::CanDragRowSize} \label { wxgridcandragrowsize}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { bool} { CanDragRowSize} { \void }
1998-05-20 14:25:30 +00:00
2003-01-18 00:16:34 +00:00
Returns true if rows can be resized by dragging with the mouse. Rows can be resized
2000-07-21 08:24:18 +00:00
by dragging the edges of their labels. If grid line dragging is enabled they can also be
2005-11-02 16:52:23 +00:00
resized by dragging the lower edge of the row in the grid cell area
2000-07-21 08:24:18 +00:00
(see \helpref { wxGrid::EnableDragGridSize} { wxgridenabledraggridsize} ).
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::CanDragGridSize} \label { wxgridcandraggridsize}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { bool} { CanDragGridSize} { \void }
1998-05-20 14:25:30 +00:00
2003-01-18 00:16:34 +00:00
Return true if the dragging of grid lines to resize rows and columns is enabled or false otherwise.
1999-02-24 08:17:50 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::CanEnableCellControl} \label { wxgridcanenablecellcontrol}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\constfunc { bool} { CanEnableCellControl} { \void }
1998-05-20 14:25:30 +00:00
2003-01-18 00:16:34 +00:00
Returns true if the in-place edit control for the current grid cell can be used and
false otherwise (e.g. if the current cell is read-only).
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::CanHaveAttributes} \label { wxgridcanhaveattributes}
\func { bool} { CanHaveAttributes} { \void }
Do we have some place to store attributes in?
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::CellToRect} \label { wxgridcelltorect}
\func { wxRect} { CellToRect} { \param { int } { row} , \param { int } { col} }
\func { wxRect} { CellToRect} { \param { const wxGridCellCoords\& } { coords} }
Return the rectangle corresponding to the grid cell's size and position in logical
coordinates.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::ClearGrid} \label { wxgridcleargrid}
\func { void} { ClearGrid} { \void }
Clears all data in the underlying grid table and repaints the grid. The table is not deleted by
2005-11-02 16:52:23 +00:00
this function. If you are using a derived table class then you need to override
2000-07-21 08:24:18 +00:00
\helpref { wxGridTableBase::Clear} { wxgridtablebaseclear} for this function to have any effect.
2005-11-02 16:52:23 +00:00
2000-07-27 01:29:07 +00:00
\membersection { wxGrid::ClearSelection} \label { wxgridclearselection}
\func { void} { ClearSelection} { \void }
Deselects all cells that are currently selected.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::CreateGrid} \label { wxgridcreategrid}
\func { bool} { CreateGrid} { \param { int } { numRows} , \param { int } { numCols} , \param { wxGrid::wxGridSelectionModes } { selmode = wxGrid::wxGridSelectCells} }
Creates a grid with the specified initial number of rows and columns.
Call this directly after the grid constructor. When you use this
function wxGrid will create and manage a simple table of string values
for you. All of the grid data will be stored in memory.
For applications with more complex data types or relationships, or for
dealing with very large datasets, you should derive your own grid table
2005-11-02 16:52:23 +00:00
class and pass a table object to the grid with \helpref { wxGrid::SetTable} { wxgridsettable} .
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::DeleteCols} \label { wxgriddeletecols}
2003-01-18 00:16:34 +00:00
\func { bool} { DeleteCols} { \param { int } { pos = 0} , \param { int } { numCols = 1} , \param { bool } { updateLabels = true} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Deletes one or more columns from a grid starting at the specified position and returns
2003-01-18 00:16:34 +00:00
true if successful. The updateLabels argument is not used at present.
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
If you are using a derived grid table class you will need to override
\helpref { wxGridTableBase::DeleteCols} { wxgridtablebasedeletecols} . See
2000-07-21 08:24:18 +00:00
\helpref { wxGrid::InsertCols} { wxgridinsertcols} for further information.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::DeleteRows} \label { wxgriddeleterows}
2003-01-18 00:16:34 +00:00
\func { bool} { DeleteRows} { \param { int } { pos = 0} , \param { int } { numRows = 1} , \param { bool } { updateLabels = true} }
2000-07-21 08:24:18 +00:00
Deletes one or more rows from a grid starting at the specified position and returns
2003-01-18 00:16:34 +00:00
true if successful. The updateLabels argument is not used at present.
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
If you are using a derived grid table class you will need to override
\helpref { wxGridTableBase::DeleteRows} { wxgridtablebasedeleterows} . See
2000-07-21 08:24:18 +00:00
\helpref { wxGrid::InsertRows} { wxgridinsertrows} for further information.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::DisableCellEditControl} \label { wxgriddisablecelleditcontrol}
\func { void} { DisableCellEditControl} { \void }
2005-11-02 16:52:23 +00:00
Disables in-place editing of grid cells.
2003-01-18 00:16:34 +00:00
Equivalent to calling EnableCellEditControl(false).
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
2006-06-01 00:13:19 +00:00
\membersection { wxGrid::DisableDragColMove} \label { wxgriddisabledragcolmove}
\func { void} { DisableDragColMove} { \void }
Disables column moving by dragging with the mouse. Equivalent to passing false to
\helpref { wxGrid::EnableDragColMove} { wxgridenabledragcolmove} .
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::DisableDragColSize} \label { wxgriddisabledragcolsize}
\func { void} { DisableDragColSize} { \void }
2005-11-02 16:52:23 +00:00
Disables column sizing by dragging with the mouse. Equivalent to passing false to
\helpref { wxGrid::EnableDragColSize} { wxgridenabledragcolsize} .
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::DisableDragGridSize} \label { wxgriddisabledraggridsize}
\func { void} { DisableDragGridSize} { \void }
Disable mouse dragging of grid lines to resize rows and columns. Equivalent to passing
2003-01-18 00:16:34 +00:00
false to \helpref { wxGrid::EnableDragGridSize} { wxgridenabledraggridsize}
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::DisableDragRowSize} \label { wxgriddisabledragrowsize}
\func { void} { DisableDragRowSize} { \void }
2005-11-02 16:52:23 +00:00
Disables row sizing by dragging with the mouse. Equivalent to passing false to
\helpref { wxGrid::EnableDragRowSize} { wxgridenabledragrowsize} .
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::EnableCellEditControl} \label { wxgridenablecelleditcontrol}
2003-01-18 00:16:34 +00:00
\func { void} { EnableCellEditControl} { \param { bool } { enable = true} }
2000-07-21 08:24:18 +00:00
Enables or disables in-place editing of grid cell data. The grid will issue either a
2001-05-24 10:39:33 +00:00
wxEVT\_ GRID\_ EDITOR\_ SHOWN or wxEVT\_ GRID\_ EDITOR\_ HIDDEN event.
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::EnableDragColSize} \label { wxgridenabledragcolsize}
2003-01-18 00:16:34 +00:00
\func { void} { EnableDragColSize} { \param { bool } { enable = true} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Enables or disables column sizing by dragging with the mouse.
2005-11-02 16:52:23 +00:00
2006-06-01 00:13:19 +00:00
\membersection { wxGrid::EnableDragColMove} \label { wxgridenabledragcolmove}
\func { void} { EnableDragColMove} { \param { bool } { enable = true} }
Enables or disables column moving by dragging with the mouse.
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::EnableDragGridSize} \label { wxgridenabledraggridsize}
2003-01-18 00:16:34 +00:00
\func { void} { EnableDragGridSize} { \param { bool } { enable = true} }
2000-07-21 08:24:18 +00:00
Enables or disables row and column resizing by dragging gridlines with the mouse.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::EnableDragRowSize} \label { wxgridenabledragrowsize}
2003-01-18 00:16:34 +00:00
\func { void} { EnableDragRowSize} { \param { bool } { enable = true} }
2000-07-21 08:24:18 +00:00
Enables or disables row sizing by dragging with the mouse.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::EnableEditing} \label { wxgridenableediting}
\func { void} { EnableEditing} { \param { bool } { edit} }
2003-01-18 00:16:34 +00:00
If the edit argument is false this function sets the whole grid as read-only. If the
argument is true the grid is set to the default state where cells may be editable. In the
2000-07-21 08:24:18 +00:00
default state you can set single grid cells and whole rows and columns to be editable or
2005-11-02 16:52:23 +00:00
read-only via
2000-07-21 08:24:18 +00:00
\helpref { wxGridCellAttribute::SetReadOnly} { wxgridcellattrsetreadonly} . For single
2005-11-02 16:52:23 +00:00
cells you can also use the shortcut function
\helpref { wxGrid::SetReadOnly} { wxgridsetreadonly} .
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
For more information about controlling grid cell attributes see the
\helpref { wxGridCellAttr} { wxgridcellattr} cell attribute class and the
2000-07-21 08:24:18 +00:00
\helpref { wxGrid classes overview} { gridoverview} .
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::EnableGridLines} \label { wxgridenablegridlines}
2003-01-18 00:16:34 +00:00
\func { void} { EnableGridLines} { \param { bool } { enable = true} }
2000-07-21 08:24:18 +00:00
Turns the drawing of grid lines on or off.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::EndBatch} \label { wxgridendbatch}
\func { void} { EndBatch} { \void }
2000-07-21 08:24:18 +00:00
Decrements the grid's batch count. When the count is greater than zero repainting of
2005-11-02 16:52:23 +00:00
the grid is suppressed. Each previous call to
2000-07-21 08:24:18 +00:00
\helpref { wxGrid::BeginBatch} { wxgridbeginbatch} must be matched by a later call to
EndBatch. Code that does a lot of grid modification can be enclosed between
BeginBatch and EndBatch calls to avoid screen flicker. The final EndBatch will
cause the grid to be repainted.
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::Fit} \label { wxgridfit}
\func { void} { Fit} { \void }
Overridden wxWindow method.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::ForceRefresh} \label { wxgridforcerefresh}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { ForceRefresh} { \void }
Causes immediate repainting of the grid. Use this instead of the usual wxWindow::Refresh.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::GetBatchCount} \label { wxgridgetbatchcount}
2000-07-21 08:24:18 +00:00
\func { int} { GetBatchCount} { \void }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the number of times that \helpref { wxGrid::BeginBatch} { wxgridbeginbatch} has been called
without (yet) matching calls to \helpref { wxGrid::EndBatch} { wxgridendbatch} . While
the grid's batch count is greater than zero the display will not be updated.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetCellAlignment} \label { wxgridgetcellalignment}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { GetCellAlignment} { \param { int } { row} , \param { int } { col} , \param { int* } { horiz} , \param { int* } { vert} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Sets the arguments to the horizontal and vertical text alignment values for the
grid cell at the specified location.
1998-05-20 14:25:30 +00:00
2001-05-24 10:39:33 +00:00
Horizontal alignment will be one of wxALIGN\_ LEFT, wxALIGN\_ CENTRE or wxALIGN\_ RIGHT. \\
Vertical alignment will be one of wxALIGN\_ TOP, wxALIGN\_ CENTRE or wxALIGN\_ BOTTOM.
1998-05-20 14:25:30 +00:00
2002-02-15 21:50:50 +00:00
\perlnote { This method only takes the parameters { \tt row} and { \tt col} and
returns a 2-element list { \tt ( horiz, vert )} .}
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetCellBackgroundColour} \label { wxgridgetcellbackgroundcolour}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { wxColour} { GetCellBackgroundColour} { \param { int } { row} , \param { int } { col} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the background colour of the cell at the specified location.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetCellEditor} \label { wxgridgetcelleditor}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { wxGridCellEditor*} { GetCellEditor} { \param { int } { row} , \param { int } { col} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns a pointer to the editor for the cell at the specified location.
1999-02-24 08:17:50 +00:00
2000-07-21 08:24:18 +00:00
See \helpref { wxGridCellEditor} { wxgridcelleditor} and
the \helpref { wxGrid overview} { gridoverview} for more information about cell editors and renderers.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetCellFont} \label { wxgridgetcellfont}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { wxFont} { GetCellFont} { \param { int } { row} , \param { int } { col} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the font for text in the grid cell at the specified location.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetCellRenderer} \label { wxgridgetcellrenderer}
1999-02-24 08:17:50 +00:00
2000-07-21 08:24:18 +00:00
\func { wxGridCellRenderer*} { GetCellRenderer} { \param { int } { row} , \param { int } { col} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns a pointer to the renderer for the grid cell at the specified location.
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
See \helpref { wxGridCellRenderer} { wxgridcellrenderer} and
the \helpref { wxGrid overview} { gridoverview} for more information about cell editors and renderers.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::GetCellTextColour} \label { wxgridgetcelltextcolour}
2000-07-21 08:24:18 +00:00
\func { wxColour} { GetCellTextColour} { \param { int } { row} , \param { int } { col} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the text colour for the grid cell at the specified location.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-27 01:29:07 +00:00
\membersection { wxGrid::GetCellValue} \label { wxgridgetcellvalue}
\func { wxString} { GetCellValue} { \param { int } { row} , \param { int } { col} }
\func { wxString} { GetCellValue} { \param { const wxGridCellCoords\& } { coords} }
Returns the string contained in the cell at the specified location. For simple applications where a
grid object automatically uses a default grid table of string values you use this function together
2005-11-02 16:52:23 +00:00
with \helpref { wxGrid::SetCellValue} { wxgridsetcellvalue} to access cell values.
2000-07-27 01:29:07 +00:00
For more complex applications where you have derived your own grid table class that contains
various data types (e.g. numeric, boolean or user-defined custom types) then you only use this
2005-11-02 16:52:23 +00:00
function for those cells that contain string values.
2000-07-27 01:29:07 +00:00
See \helpref { wxGridTableBase::CanGetValueAs} { wxgridtablebasecangetvalueas}
and the \helpref { wxGrid overview} { gridoverview} for more information.
2004-10-14 10:28:20 +00:00
2005-11-02 16:52:23 +00:00
2006-06-01 00:13:19 +00:00
\membersection { wxGrid::GetColAt} \label { wxgridgetcolat}
\constfunc { int} { GetColAt} { \param { int } { colPos} }
Returns the column ID of the specified column position.
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::GetColLeft} \label { wxgridgetcolleft}
\constfunc { int} { GetColLeft} { \param { int } { col} }
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetColLabelAlignment} \label { wxgridgetcollabelalignment}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { GetColLabelAlignment} { \param { int* } { horiz} , \param { int* } { vert} }
1999-02-24 08:17:50 +00:00
2000-07-21 08:24:18 +00:00
Sets the arguments to the current column label alignment values.
1998-05-20 14:25:30 +00:00
2004-02-08 15:51:13 +00:00
Horizontal alignment will be one of wxALIGN\_ LEFT, wxALIGN\_ CENTRE or wxALIGN\_ RIGHT.\\
Vertical alignment will be one of wxALIGN\_ TOP, wxALIGN\_ CENTRE or wxALIGN\_ BOTTOM.
1998-05-20 14:25:30 +00:00
2002-02-15 21:50:50 +00:00
\perlnote { This method takes no parameters and
returns a 2-element list { \tt ( horiz, vert )} .}
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetColLabelSize} \label { wxgridgetcollabelsize}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { int} { GetColLabelSize} { \void }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the current height of the column labels.
1999-02-24 08:17:50 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetColLabelValue} \label { wxgridgetcollabelvalue}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { wxString} { GetColLabelValue} { \param { int } { col} }
1998-05-20 14:25:30 +00:00
2002-06-07 20:15:28 +00:00
Returns the specified column label. The default grid table class provides column labels of
2005-11-02 16:52:23 +00:00
the form A,B...Z,AA,AB...ZZ,AAA... If you are using a custom grid table you can override
2000-07-21 08:24:18 +00:00
\helpref { wxGridTableBase::GetColLabelValue} { wxgridtablebasegetcollabelvalue} to provide
2005-11-02 16:52:23 +00:00
your own labels.
1998-05-20 14:25:30 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::GetColMinimalAcceptableWidth} \label { wxgridgetcolminimalacceptablewidth}
\func { int} { GetColMinimalAcceptableWidth} { }
This returns the value of the lowest column width that can be handled correctly. See
member \helpref { SetColMinimalAcceptableWidth} { wxgridsetcolminimalacceptablewidth} for details.
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::GetColMinimalWidth} \label { wxgridgetcolminimalwidth}
\constfunc { int} { GetColMinimalWidth} { \param { int } { col} }
Get the minimal width of the given column/row.
2005-11-02 16:52:23 +00:00
2006-06-01 00:13:19 +00:00
\membersection { wxGrid::GetColPos} \label { wxgridgetcolpos}
\constfunc { int} { GetColPos} { \param { int } { colID} }
Returns the position of the specified column.
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::GetColRight} \label { wxgridgetcolright}
\constfunc { int} { GetColRight} { \param { int } { col} }
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetColSize} \label { wxgridgetcolsize}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { int} { GetColSize} { \param { int } { col} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the width of the specified column.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetDefaultCellAlignment} \label { wxgridgetdefaultcellalignment}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { GetDefaultCellAlignment} { \param { int* } { horiz} , \param { int* } { vert} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Sets the arguments to the current default horizontal and vertical text alignment
values.
1998-05-20 14:25:30 +00:00
2000-09-10 19:01:03 +00:00
Horizontal alignment will be one of wxALIGN\_ LEFT, wxALIGN\_ CENTRE or wxALIGN\_ RIGHT. \\
Vertical alignment will be one of wxALIGN\_ TOP, wxALIGN\_ CENTRE or wxALIGN\_ BOTTOM.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetDefaultCellBackgroundColour} \label { wxgridgetdefaultcellbackgroundcolour}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { wxColour} { GetDefaultCellBackgroundColour} { \void }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the current default background colour for grid cells.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetDefaultCellFont} \label { wxgridgetdefaultcellfont}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { wxFont} { GetDefaultCellFont} { \void }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the current default font for grid cell text.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetDefaultCellTextColour} \label { wxgridgetdefaultcelltextcolour}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { wxColour} { GetDefaultCellTextColour} { \void }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the current default colour for grid cell text.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetDefaultColLabelSize} \label { wxgridgetdefaultcollabelsize}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { int} { GetDefaultColLabelSize} { \void }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the default height for column labels.
1999-06-23 11:26:19 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetDefaultColSize} \label { wxgridgetdefaultcolsize}
1999-06-23 11:26:19 +00:00
2000-07-21 08:24:18 +00:00
\func { int} { GetDefaultColSize} { \void }
1999-06-23 11:26:19 +00:00
2000-07-21 08:24:18 +00:00
Returns the current default width for grid columns.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetDefaultEditor} \label { wxgridgetdefaulteditor}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\constfunc { wxGridCellEditor*} { GetDefaultEditor} { \void }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns a pointer to the current default grid cell editor.
See \helpref { wxGridCellEditor} { wxgridcelleditor} and
the \helpref { wxGrid overview} { gridoverview} for more information about cell editors and renderers.
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::GetDefaultEditorForCell} \label { wxgridgetdefaulteditorforcell}
\constfunc { wxGridCellEditor*} { GetDefaultEditorForCell} { \param { int } { row} , \param { int } { col} }
\constfunc { wxGridCellEditor*} { GetDefaultEditorForCell} { \param { const wxGridCellCoords\& } { c} }
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::GetDefaultEditorForType} \label { wxgridgetdefaulteditorfortype}
\constfunc { wxGridCellEditor*} { GetDefaultEditorForType} { \param { const wxString\& } { typeName} }
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetDefaultRenderer} \label { wxgridgetdefaultrenderer}
\constfunc { wxGridCellRenderer*} { GetDefaultRenderer} { \void }
Returns a pointer to the current default grid cell renderer.
See \helpref { wxGridCellRenderer} { wxgridcellrenderer} and
the \helpref { wxGrid overview} { gridoverview} for more information about cell editors and renderers.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::GetDefaultRendererForCell} \label { wxgridgetdefaultrendererforcell}
\constfunc { wxGridCellRenderer*} { GetDefaultRendererForCell} { \param { int } { row} , \param { int } { col} }
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::GetDefaultRendererForType} \label { wxgridgetdefaultrendererfortype}
\constfunc { wxGridCellRenderer*} { GetDefaultRendererForType} { \param { const wxString\& } { typeName} }
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetDefaultRowLabelSize} \label { wxgridgetdefaultrowlabelsize}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { int} { GetDefaultRowLabelSize} { \void }
Returns the default width for the row labels.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetDefaultRowSize} \label { wxgridgetdefaultrowsize}
\func { int} { GetDefaultRowSize} { \void }
Returns the current default height for grid rows.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetGridCursorCol} \label { wxgridgetgridcursorcol}
\func { int} { GetGridCursorCol} { \void }
Returns the current grid cell column position.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetGridCursorRow} \label { wxgridgetgridcursorrow}
\func { int} { GetGridCursorRow} { \void }
Returns the current grid cell row position.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetGridLineColour} \label { wxgridgetgridlinecolour}
\func { wxColour} { GetGridLineColour} { \void }
Returns the colour used for grid lines.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GridLinesEnabled} \label { wxgridgridlinesenabled}
\func { bool} { GridLinesEnabled} { \void }
2003-01-18 00:16:34 +00:00
Returns true if drawing of grid lines is turned on, false otherwise.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::GetLabelBackgroundColour} \label { wxgridgetlabelbackgroundcolour}
2000-07-21 08:24:18 +00:00
\func { wxColour} { GetLabelBackgroundColour} { \void }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the colour used for the background of row and column labels.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetLabelFont} \label { wxgridgetlabelfont}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { wxFont} { GetLabelFont} { \void }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the font used for row and column labels.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::GetLabelTextColour} \label { wxgridgetlabeltextcolour}
2000-07-21 08:24:18 +00:00
\func { wxColour} { GetLabelTextColour} { \void }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the colour used for row and column label text.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetNumberCols} \label { wxgridgetnumbercols}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { int} { GetNumberCols} { \void }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the total number of grid columns (actually the number of columns in the underlying grid
table).
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetNumberRows} \label { wxgridgetnumberrows}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { int} { GetNumberRows} { \void }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the total number of grid rows (actually the number of rows in the underlying grid table).
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::GetOrCreateCellAttr} \label { wxgridgetorcreatecellattr}
\constfunc { wxGridCellAttr*} { GetOrCreateCellAttr} { \param { int } { row} , \param { int } { col} }
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::GetRowMinimalAcceptableHeight} \label { wxgridgetrowminimalacceptableheight}
\func { int} { GetRowMinimalAcceptableHeight} { }
This returns the value of the lowest row width that can be handled correctly. See
member \helpref { SetRowMinimalAcceptableHeight} { wxgridsetrowminimalacceptableheight} for details.
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::GetRowMinimalHeight} \label { wxgridgetrowminimalheight}
\constfunc { int} { GetRowMinimalHeight} { \param { int } { col} }
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetRowLabelAlignment} \label { wxgridgetrowlabelalignment}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { GetRowLabelAlignment} { \param { int* } { horiz} , \param { int* } { vert} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Sets the arguments to the current row label alignment values.
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Horizontal alignment will be one of wxLEFT, wxCENTRE or wxRIGHT. \\
Vertical alignment will be one of wxTOP, wxCENTRE or wxBOTTOM.
1998-05-20 14:25:30 +00:00
2002-02-15 21:50:50 +00:00
\perlnote { This method takes no parameters and
returns a 2-element list { \tt ( horiz, vert )} .}
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetRowLabelSize} \label { wxgridgetrowlabelsize}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { int} { GetRowLabelSize} { \void }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the current width of the row labels.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetRowLabelValue} \label { wxgridgetrowlabelvalue}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { wxString} { GetRowLabelValue} { \param { int } { row} }
1998-05-20 14:25:30 +00:00
2002-06-07 20:15:28 +00:00
Returns the specified row label. The default grid table class provides numeric row labels.
2005-11-02 16:52:23 +00:00
If you are using a custom grid table you can override
2000-07-21 08:24:18 +00:00
\helpref { wxGridTableBase::GetRowLabelValue} { wxgridtablebasegetcollabelvalue} to provide
2005-11-02 16:52:23 +00:00
your own labels.
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetRowSize} \label { wxgridgetrowsize}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { int} { GetRowSize} { \param { int } { row} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns the height of the specified row.
1998-05-20 14:25:30 +00:00
2004-10-14 10:28:20 +00:00
2005-11-02 16:52:23 +00:00
\membersection { wxGrid::GetScrollLineX} \label { wxgridgetscrolllinex}
\constfunc { int} { GetScrollLineX} { \void }
2004-10-14 10:28:20 +00:00
Returns the number of pixels per horizontal scroll increment. The default is 15.
2005-11-02 16:52:23 +00:00
\wxheading { See also}
\helpref { wxGrid::GetScrollLineY} { wxgridgetscrollliney} ,\rtfsp
\helpref { wxGrid::SetScrollLineX} { wxgridsetscrolllinex} ,\rtfsp
\helpref { wxGrid::SetScrollLineY} { wxgridsetscrollliney}
2004-10-14 10:28:20 +00:00
2005-11-02 16:52:23 +00:00
\membersection { wxGrid::GetScrollLineY} \label { wxgridgetscrollliney}
\constfunc { int} { GetScrollLineY} { \void }
2004-10-14 10:28:20 +00:00
Returns the number of pixels per vertical scroll increment. The default is 15.
2005-11-02 16:52:23 +00:00
\wxheading { See also}
\helpref { wxGrid::GetScrollLineX} { wxgridgetscrolllinex} ,\rtfsp
\helpref { wxGrid::SetScrollLineX} { wxgridsetscrolllinex} ,\rtfsp
\helpref { wxGrid::SetScrollLineY} { wxgridsetscrollliney}
2002-09-07 13:58:25 +00:00
\membersection { wxGrid::GetSelectionMode} \label { wxgridgetselectionmode}
\constfunc { wxGrid::wxGridSelectionModes} { GetSelectionMode} { \void }
Returns the current selection mode, see \helpref { wxGrid::SetSelectionMode} { wxgridsetselectionmode} .
2005-11-02 16:52:23 +00:00
2002-09-07 13:58:25 +00:00
\membersection { wxGrid::GetSelectedCells} \label { wxgridgetselectedcells}
\constfunc { wxGridCellCoordsArray} { GetSelectedCells} { \void }
Returns an array of singly selected cells.
2005-11-02 16:52:23 +00:00
2002-09-07 13:58:25 +00:00
\membersection { wxGrid::GetSelectedCols} \label { wxgridgetselectedcols}
\constfunc { wxArrayInt} { GetSelectedCols} { \void }
Returns an array of selected cols.
2005-11-02 16:52:23 +00:00
2002-09-07 13:58:25 +00:00
\membersection { wxGrid::GetSelectedRows} \label { wxgridgetselectedrows}
\constfunc { wxArrayInt} { GetSelectedRows} { \void }
Returns an array of selected rows.
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::GetSelectionBackground} \label { wxgridgetselectionbackground}
\constfunc { wxColour} { GetSelectionBackground} { \void }
Access or update the selection fore/back colours
2005-11-02 16:52:23 +00:00
2002-09-07 13:58:25 +00:00
\membersection { wxGrid::GetSelectionBlockTopLeft} \label { wxgridgetselectionblocktopleft}
\constfunc { wxGridCellCoordsArray} { GetSelectionBlockTopLeft} { \void }
2005-11-02 16:52:23 +00:00
Returns an array of the top left corners of blocks of selected cells,
2002-09-07 13:58:25 +00:00
see \helpref { wxGrid::GetSelectionBlockBottomRight} { wxgridgetselectionblockbottomright} .
2005-11-02 16:52:23 +00:00
2002-09-07 13:58:25 +00:00
\membersection { wxGrid::GetSelectionBlockBottomRight} \label { wxgridgetselectionblockbottomright}
\constfunc { wxGridCellCoordsArray} { GetSelectionBlockBottomRight} { \void }
Returns an array of the bottom right corners of blocks of selected cells,
see \helpref { wxGrid::GetSelectionBlockTopLeft} { wxgridgetselectionblocktopleft} .
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::GetSelectionForeground} \label { wxgridgetselectionforeground}
\constfunc { wxColour} { GetSelectionForeground} { \void }
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::GetTable} \label { wxgridgettable}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\constfunc { wxGridTableBase *} { GetTable} { \void }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Returns a base pointer to the current table object.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::GetViewWidth} \label { wxgridgetviewwidth}
\func { int} { GetViewWidth} { \void }
Returned number of whole cols visible.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::HideCellEditControl} \label { wxgridhidecelleditcontrol}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { HideCellEditControl} { \void }
Hides the in-place cell edit control.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::InitColWidths} \label { wxgridinitcolwidths}
\func { void} { InitColWidths} { \void }
Init the m\_ colWidths/Rights arrays
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::InitRowHeights} \label { wxgridinitrowheights}
\func { void} { InitRowHeights} { \void }
NB: { \it never} access m\_ row/col arrays directly because they are created
on demand, { \it always} use accessor functions instead!
Init the m\_ rowHeights/Bottoms arrays with default values.
2005-11-02 16:52:23 +00:00
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::InsertCols} \label { wxgridinsertcols}
2003-01-18 00:16:34 +00:00
\func { bool} { InsertCols} { \param { int } { pos = 0} , \param { int } { numCols = 1} , \param { bool } { updateLabels = true} }
2000-07-21 08:24:18 +00:00
Inserts one or more new columns into a grid with the first new column at the
2003-01-18 00:16:34 +00:00
specified position and returns true if successful. The updateLabels argument is not
2005-11-02 16:52:23 +00:00
used at present.
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
The sequence of actions begins with the grid object requesting the underlying grid
table to insert new columns. If this is successful the table notifies the grid and the
2006-06-01 00:13:19 +00:00
grid updates the display. For a default grid (one where you have called
2000-07-21 08:24:18 +00:00
\helpref { wxGrid::CreateGrid} { wxgridcreategrid} ) this process is automatic. If you are
2005-11-02 16:52:23 +00:00
using a custom grid table (specified with \helpref { wxGrid::SetTable} { wxgridsettable} )
2006-06-01 00:13:19 +00:00
then you must override
2000-07-21 08:24:18 +00:00
\helpref { wxGridTableBase::InsertCols} { wxgridtablebaseinsertcols} in your derived
table class.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::InsertRows} \label { wxgridinsertrows}
2003-01-18 00:16:34 +00:00
\func { bool} { InsertRows} { \param { int } { pos = 0} , \param { int } { numRows = 1} , \param { bool } { updateLabels = true} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Inserts one or more new rows into a grid with the first new row at the specified
2003-01-18 00:16:34 +00:00
position and returns true if successful. The updateLabels argument is not used at
2005-11-02 16:52:23 +00:00
present.
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
The sequence of actions begins with the grid object requesting the underlying grid
table to insert new rows. If this is successful the table notifies the grid and the
2006-06-01 00:13:19 +00:00
grid updates the display. For a default grid (one where you have called
2000-07-21 08:24:18 +00:00
\helpref { wxGrid::CreateGrid} { wxgridcreategrid} ) this process is automatic. If you are
2005-11-02 16:52:23 +00:00
using a custom grid table (specified with \helpref { wxGrid::SetTable} { wxgridsettable} )
2006-06-01 00:13:19 +00:00
then you must override
2000-07-21 08:24:18 +00:00
\helpref { wxGridTableBase::InsertRows} { wxgridtablebaseinsertrows} in your derived
table class.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::IsCellEditControlEnabled} \label { wxgridiscelleditcontrolenabled}
\constfunc { bool} { IsCellEditControlEnabled} { \void }
2003-01-18 00:16:34 +00:00
Returns true if the in-place edit control is currently enabled.
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::IsCurrentCellReadOnly} \label { wxgridiscurrentcellreadonly}
\constfunc { bool} { IsCurrentCellReadOnly} { \void }
2003-01-18 00:16:34 +00:00
Returns true if the current cell has been set to read-only
2000-07-21 08:24:18 +00:00
(see \helpref { wxGrid::SetReadOnly} { wxgridsetreadonly} ).
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::IsEditable} \label { wxgridiseditable}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { bool} { IsEditable} { \void }
1998-05-20 14:25:30 +00:00
2003-01-18 00:16:34 +00:00
Returns false if the whole grid has been set as read-only or true otherwise.
2000-07-21 08:24:18 +00:00
See \helpref { wxGrid::EnableEditing} { wxgridenableediting} for more information about
controlling the editing status of grid cells.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2002-09-07 13:58:25 +00:00
\membersection { wxGrid::IsInSelection} \label { wxgridisinselection}
\constfunc { bool} { IsInSelection} { \param { int } { row} , \param { int } { col} }
\constfunc { bool} { IsInSelection} { \param { const wxGridCellCoords\& } { coords} }
Is this cell currently selected.
2005-11-02 16:52:23 +00:00
2000-07-27 01:29:07 +00:00
\membersection { wxGrid::IsReadOnly} \label { wxgridisreadonly}
\constfunc { bool} { IsReadOnly} { \param { int } { row} , \param { int } { col} }
2003-01-18 00:16:34 +00:00
Returns true if the cell at the specified location can't be edited.
2000-07-27 01:29:07 +00:00
See also \helpref { wxGrid::IsReadOnly} { wxgridisreadonly} .
2005-11-02 16:52:23 +00:00
2000-07-27 01:29:07 +00:00
\membersection { wxGrid::IsSelection} \label { wxgridisselection}
\func { bool} { IsSelection} { \void }
2003-01-18 00:16:34 +00:00
Returns true if there are currently rows, columns or blocks of cells selected.
2000-07-27 01:29:07 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::IsVisible} \label { wxgridisvisible}
1998-05-20 14:25:30 +00:00
2003-01-18 00:16:34 +00:00
\func { bool} { IsVisible} { \param { int } { row} , \param { int } { col} , \param { bool } { wholeCellVisible = true} }
1998-05-20 14:25:30 +00:00
2003-01-18 00:16:34 +00:00
\func { bool} { IsVisible} { \param { const wxGridCellCoords\& } { coords} , \param { bool } { wholeCellVisible = true} }
1998-05-20 14:25:30 +00:00
2003-01-18 00:16:34 +00:00
Returns true if a cell is either wholly visible (the default) or at least partially
2000-07-21 08:24:18 +00:00
visible in the grid window.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::MakeCellVisible} \label { wxgridmakecellvisible}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { MakeCellVisible} { \param { int } { row} , \param { int } { col} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { MakeCellVisible} { \param { const wxGridCellCoords\& } { coords} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Brings the specified cell into the visible grid cell area with minimal scrolling. Does
2005-11-02 16:52:23 +00:00
nothing if the cell is already visible.
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::MoveCursorDown} \label { wxgridmovecursordown}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { bool} { MoveCursorDown} { \param { bool } { expandSelection} }
1998-05-20 14:25:30 +00:00
2000-09-10 19:01:03 +00:00
Moves the grid cursor down by one row. If a block of cells was previously selected it
2003-01-18 00:16:34 +00:00
will expand if the argument is true or be cleared if the argument is false.
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\wxheading { Keyboard} \\
This function is called for Down cursor key presses or Shift+Down to expand a selection.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::MoveCursorLeft} \label { wxgridmovecursorleft}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { bool} { MoveCursorLeft} { \param { bool } { expandSelection} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Moves the grid cursor left by one column. If a block of cells was previously selected it
2003-01-18 00:16:34 +00:00
will expand if the argument is true or be cleared if the argument is false.
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\wxheading { Keyboard} \\
This function is called for Left cursor key presses or Shift+Left to expand a selection.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::MoveCursorRight} \label { wxgridmovecursorright}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { bool} { MoveCursorRight} { \param { bool } { expandSelection} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Moves the grid cursor right by one column. If a block of cells was previously selected it
2003-01-18 00:16:34 +00:00
will expand if the argument is true or be cleared if the argument is false.
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\wxheading { Keyboard} \\
This function is called for Right cursor key presses or Shift+Right to expand a selection.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::MoveCursorUp} \label { wxgridmovecursorup}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { bool} { MoveCursorUp} { \param { bool } { expandSelection} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Moves the grid cursor up by one row. If a block of cells was previously selected it
2003-01-18 00:16:34 +00:00
will expand if the argument is true or be cleared if the argument is false.
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\wxheading { Keyboard} \\
This function is called for Up cursor key presses or Shift+Up to expand a selection.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::MoveCursorDownBlock} \label { wxgridmovecursordownblock}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { bool} { MoveCursorDownBlock} { \param { bool } { expandSelection} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Moves the grid cursor down in the current column such that it skips to the beginning or
end of a block of non-empty cells. If a block of cells was previously selected it
2003-01-18 00:16:34 +00:00
will expand if the argument is true or be cleared if the argument is false.
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\wxheading { Keyboard} \\
This function is called for the Ctrl+Down key combination. Shift+Ctrl+Down expands a selection.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::MoveCursorLeftBlock} \label { wxgridmovecursorleftblock}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { bool} { MoveCursorLeftBlock} { \param { bool } { expandSelection} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Moves the grid cursor left in the current row such that it skips to the beginning or
end of a block of non-empty cells. If a block of cells was previously selected it
2003-01-18 00:16:34 +00:00
will expand if the argument is true or be cleared if the argument is false.
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\wxheading { Keyboard} \\
This function is called for the Ctrl+Left key combination. Shift+Ctrl+left expands a selection.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::MoveCursorRightBlock} \label { wxgridmovecursorrightblock}
\func { bool} { MoveCursorRightBlock} { \param { bool } { expandSelection} }
Moves the grid cursor right in the current row such that it skips to the beginning or
end of a block of non-empty cells. If a block of cells was previously selected it
2003-01-18 00:16:34 +00:00
will expand if the argument is true or be cleared if the argument is false.
2000-07-21 08:24:18 +00:00
\wxheading { Keyboard} \\
This function is called for the Ctrl+Right key combination. Shift+Ctrl+Right expands a selection.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::MoveCursorUpBlock} \label { wxgridmovecursorupblock}
\func { bool} { MoveCursorUpBlock} { \param { bool } { expandSelection} }
Moves the grid cursor up in the current column such that it skips to the beginning or
end of a block of non-empty cells. If a block of cells was previously selected it
2003-01-18 00:16:34 +00:00
will expand if the argument is true or be cleared if the argument is false.
2000-07-21 08:24:18 +00:00
\wxheading { Keyboard} \\
This function is called for the Ctrl+Up key combination. Shift+Ctrl+Up expands a selection.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::MovePageDown} \label { wxgridmovepagedown}
\func { bool} { MovePageDown} { \void }
Moves the grid cursor down by some number of rows so that the previous bottom visible row
becomes the top visible row.
\wxheading { Keyboard} \\
This function is called for PgDn keypresses.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::MovePageUp} \label { wxgridmovepageup}
\func { bool} { MovePageUp} { \void }
Moves the grid cursor up by some number of rows so that the previous top visible row
becomes the bottom visible row.
\wxheading { Keyboard} \\
This function is called for PgUp keypresses.
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::RegisterDataType} \label { wxgridregisterdatatype}
\func { void} { RegisterDataType} { \param { const wxString\& } { typeName} , \param { wxGridCellRenderer* } { renderer} , \param { wxGridCellEditor* } { editor} }
Methods for a registry for mapping data types to Renderers/Editors
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SaveEditControlValue} \label { wxgridsaveeditcontrolvalue}
\func { void} { SaveEditControlValue} { \void }
Sets the value of the current grid cell to the current in-place edit control value.
This is called automatically when the grid cursor moves from the current cell to a
new cell. It is also a good idea to call this function when closing a grid since
any edits to the final cell location will not be saved otherwise.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-27 01:29:07 +00:00
\membersection { wxGrid::SelectAll} \label { wxgridselectall}
\func { void} { SelectAll} { \void }
Selects all cells in the grid.
2005-11-02 16:52:23 +00:00
2000-07-27 01:29:07 +00:00
\membersection { wxGrid::SelectBlock} \label { wxgridselectblock}
2005-11-02 16:52:23 +00:00
\func { void} { SelectBlock} { \param { int } { topRow} , \param { int } { leftCol} ,
2003-01-18 00:16:34 +00:00
\param { int } { bottomRow} , \param { int } { rightCol} , \param { bool } { addToSelected = false} }
2000-07-27 01:29:07 +00:00
2005-11-02 16:52:23 +00:00
\func { void} { SelectBlock} { \param { const wxGridCellCoords\& } { topLeft} ,
2003-01-18 00:16:34 +00:00
\param { const wxGridCellCoords\& } { bottomRight} , \param { bool } { addToSelected = false} }
2000-07-27 01:29:07 +00:00
2003-01-18 00:16:34 +00:00
Selects a rectangular block of cells. If addToSelected is false then any existing selection will be
2005-11-02 16:52:23 +00:00
deselected; if true the column will be added to the existing selection.
2000-07-27 01:29:07 +00:00
\membersection { wxGrid::SelectCol} \label { wxgridselectcol}
2003-01-18 00:16:34 +00:00
\func { void} { SelectCol} { \param { int } { col} , \param { bool } { addToSelected = false} }
2000-07-27 01:29:07 +00:00
2003-01-18 00:16:34 +00:00
Selects the specified column. If addToSelected is false then any existing selection will be
deselected; if true the column will be added to the existing selection.
2000-07-27 01:29:07 +00:00
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::SelectionToDeviceRect} \label { wxgridselectiontodevicerect}
\func { wxRect} { SelectionToDeviceRect} { \void }
This function returns the rectangle that encloses the selected cells
in device coords and clipped to the client size of the grid window.
2005-11-02 16:52:23 +00:00
2000-07-27 01:29:07 +00:00
\membersection { wxGrid::SelectRow} \label { wxgridselectrow}
2003-01-18 00:16:34 +00:00
\func { void} { SelectRow} { \param { int } { row} , \param { bool } { addToSelected = false} }
2000-07-27 01:29:07 +00:00
2003-01-18 00:16:34 +00:00
Selects the specified row. If addToSelected is false then any existing selection will be
deselected; if true the row will be added to the existing selection.
2000-07-27 01:29:07 +00:00
2005-11-02 16:52:23 +00:00
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::SetCellAlignment} \label { wxgridsetcellalignment}
2000-07-21 08:24:18 +00:00
\func { void} { SetCellAlignment} { \param { int } { row} , \param { int } { col} , \param { int } { horiz} , \param { int } { vert} }
1998-05-20 14:25:30 +00:00
2000-09-10 19:01:03 +00:00
\func { void} { SetCellAlignment} { \param { int } { align} , \param { int } { row} , \param { int } { col} }
2002-06-07 20:15:28 +00:00
Sets the horizontal and vertical alignment for grid cell text at the specified location.
1998-05-20 14:25:30 +00:00
2001-05-24 10:39:33 +00:00
Horizontal alignment should be one of wxALIGN\_ LEFT, wxALIGN\_ CENTRE or wxALIGN\_ RIGHT. \\
Vertical alignment should be one of wxALIGN\_ TOP, wxALIGN\_ CENTRE or wxALIGN\_ BOTTOM.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::SetCellBackgroundColour} \label { wxgridsetcellbackgroundcolour}
\func { void} { SetCellBackgroundColour} { \param { int } { row} , \param { int } { col} , \param { const wxColour\& } { colour} }
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetCellEditor} \label { wxgridsetcelleditor}
1999-02-24 08:17:50 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { SetCellEditor} { \param { int } { row} , \param { int } { col} , \param { wxGridCellEditor* } { editor} }
2005-11-02 16:52:23 +00:00
Sets the editor for the grid cell at the specified location.
2000-07-21 08:24:18 +00:00
The grid will take ownership of the pointer.
See \helpref { wxGridCellEditor} { wxgridcelleditor} and
the \helpref { wxGrid overview} { gridoverview} for more information about cell editors and renderers.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetCellFont} \label { wxgridsetcellfont}
2000-10-10 11:11:36 +00:00
\func { void} { SetCellFont} { \param { int } { row} , \param { int } { col} , \param { const wxFont\& } { font} }
2000-07-21 08:24:18 +00:00
Sets the font for text in the grid cell at the specified location.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetCellRenderer} \label { wxgridsetcellrenderer}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { SetCellRenderer} { \param { int } { row} , \param { int } { col} , \param { wxGridCellRenderer* } { renderer} }
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
Sets the renderer for the grid cell at the specified location.
2000-07-21 08:24:18 +00:00
The grid will take ownership of the pointer.
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
See \helpref { wxGridCellRenderer} { wxgridcellrenderer} and
the \helpref { wxGrid overview} { gridoverview} for more information about cell editors and renderers.
1999-02-24 08:17:50 +00:00
2005-11-02 16:52:23 +00:00
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::SetCellTextColour} \label { wxgridsetcelltextcolour}
2000-11-05 11:44:44 +00:00
\func { void} { SetCellTextColour} { \param { int } { row} , \param { int } { col} , \param { const wxColour\& } { colour} }
1998-05-20 14:25:30 +00:00
2000-09-10 19:01:03 +00:00
\func { void} { SetCellTextColour} { \param { const wxColour\& } { val} , \param { int } { row} , \param { int } { col} }
2000-10-10 11:11:36 +00:00
\func { void} { SetCellTextColour} { \param { const wxColour\& } { colour} }
2000-09-10 19:01:03 +00:00
2000-07-21 08:24:18 +00:00
Sets the text colour for the grid cell at the specified location.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-27 01:29:07 +00:00
\membersection { wxGrid::SetCellValue} \label { wxgridsetcellvalue}
\func { void} { SetCellValue} { \param { int } { row} , \param { int } { col} , \param { const wxString\& } { s} }
\func { void} { SetCellValue} { \param { const wxGridCellCoords\& } { coords} , \param { const wxString\& } { s} }
2000-09-10 19:01:03 +00:00
\func { void} { SetCellValue} { \param { const wxString\& } { val} , \param { int } { row} , \param { int } { col} }
2000-07-27 01:29:07 +00:00
Sets the string value for the cell at the specified location. For simple applications where a
grid object automatically uses a default grid table of string values you use this function together
2005-11-02 16:52:23 +00:00
with \helpref { wxGrid::GetCellValue} { wxgridgetcellvalue} to access cell values.
2000-07-27 01:29:07 +00:00
For more complex applications where you have derived your own grid table class that contains
various data types (e.g. numeric, boolean or user-defined custom types) then you only use this
2000-09-10 19:01:03 +00:00
function for those cells that contain string values.
The last form is for backward compatibility only.
2000-07-27 01:29:07 +00:00
2006-06-01 00:13:19 +00:00
See \helpref { wxGridTableBase::CanSetValueAs} { wxgridtablebasecangetvalueas}
2000-07-27 01:29:07 +00:00
and the \helpref { wxGrid overview} { gridoverview} for more information.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetColAttr} \label { wxgridsetcolattr}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { SetColAttr} { \param { int } { col} , \param { wxGridCellAttr* } { attr} }
1999-02-24 08:17:50 +00:00
2000-07-21 08:24:18 +00:00
Sets the cell attributes for all cells in the specified column.
1998-05-20 14:25:30 +00:00
2006-06-01 00:13:19 +00:00
For more information about controlling grid cell attributes see the
\helpref { wxGridCellAttr} { wxgridcellattr} cell attribute class and the
2000-07-21 08:24:18 +00:00
\helpref { wxGrid classes overview} { gridoverview} .
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetColFormatBool} \label { wxgridsetcolformatbool}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { SetColFormatBool} { \param { int } { col} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Sets the specified column to display boolean values. wxGrid displays boolean values with a checkbox.
1999-02-24 08:17:50 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetColFormatNumber} \label { wxgridsetcolformatnumber}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { SetColFormatNumber} { \param { int } { col} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Sets the specified column to display integer values.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetColFormatFloat} \label { wxgridsetcolformatfloat}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { SetColFormatFloat} { \param { int } { col} , \param { int } { width = -1} , \param { int } { precision = -1} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Sets the specified column to display floating point values with the given width and precision.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetColFormatCustom} \label { wxgridsetcolformatcustom}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { SetColFormatCustom} { \param { int } { col} , \param { const wxString\& } { typeName} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Sets the specified column to display data in a custom format.
See the \helpref { wxGrid overview} { gridoverview} for more information on working
with custom data types.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetColLabelAlignment} \label { wxgridsetcollabelalignment}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { SetColLabelAlignment} { \param { int } { horiz} , \param { int } { vert} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Sets the horizontal and vertical alignment of column label text.
1998-05-20 14:25:30 +00:00
2001-05-24 10:39:33 +00:00
Horizontal alignment should be one of wxALIGN\_ LEFT, wxALIGN\_ CENTRE or wxALIGN\_ RIGHT.
2000-10-10 11:11:36 +00:00
2001-05-24 10:39:33 +00:00
Vertical alignment should be one of wxALIGN\_ TOP, wxALIGN\_ CENTRE or wxALIGN\_ BOTTOM.
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetColLabelSize} \label { wxgridsetcollabelsize}
\func { void} { SetColLabelSize} { \param { int } { height} }
Sets the height of the column labels.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetColLabelValue} \label { wxgridsetcollabelvalue}
2000-10-10 11:11:36 +00:00
\func { void} { SetColLabelValue} { \param { int } { col} , \param { const wxString\& } { value} }
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
Set the value for the given column label. If you are using a derived grid table you must
2000-07-21 08:24:18 +00:00
override \helpref { wxGridTableBase::SetColLabelValue} { wxgridtablebasesetcollabelvalue}
for this to have any effect.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetColMinimalWidth} \label { wxgridsetcolminimalwidth}
\func { void} { SetColMinimalWidth} { \param { int } { col} , \param { int } { width} }
Sets the minimal width for the specified column. This should normally be called when creating the grid
because it will not resize a column that is already narrower than the minimal width.
2003-05-18 19:49:43 +00:00
The width argument must be higher than the minimimal acceptable column width, see
\helpref { wxGrid::GetColMinimalAcceptableWidth} { wxgridgetcolminimalacceptablewidth} .
2005-11-02 16:52:23 +00:00
2003-05-18 19:49:43 +00:00
\membersection { wxGrid::SetColMinimalAcceptableWidth} \label { wxgridsetcolminimalacceptablewidth}
\func { void} { SetColMinimalAcceptableWidth} { \param { int } { width} }
This modifies the minimum column width that can be handled correctly. Specifying a low value here
allows smaller grid cells to be dealt with correctly. Specifying a value here which is much smaller
than the actual minimum size will incur a performance penalty in the functions which perform
grid cell index lookup on the basis of screen coordinates.
This should normally be called when creating the grid because it will not resize existing columns
2005-11-02 16:52:23 +00:00
with sizes smaller than the value specified here.
2003-05-18 19:49:43 +00:00
2006-06-01 00:13:19 +00:00
\membersection { wxGrid::SetColPos} \label { wxgridsetcolpos}
\func { void} { SetColPos} { \param { int } { colID} , \param { int } { newPos} }
Sets the position of the specified column.
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetColSize} \label { wxgridsetcolsize}
\func { void} { SetColSize} { \param { int } { col} , \param { int } { width} }
2005-11-02 16:52:23 +00:00
Sets the width of the specified column.
2000-07-21 08:24:18 +00:00
This function does not refresh the grid. If you are calling it outside of a BeginBatch / EndBatch
2005-11-02 16:52:23 +00:00
block you can use \helpref { wxGrid::ForceRefresh} { wxgridforcerefresh} to see the changes.
2000-07-21 08:24:18 +00:00
2003-01-18 00:16:34 +00:00
Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will
2000-07-21 08:24:18 +00:00
also be set as the minimal width for the column.
2000-09-10 19:01:03 +00:00
\wxheading { Note} \\
2000-07-21 08:24:18 +00:00
wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
2005-11-02 16:52:23 +00:00
The memory requirements for this could become prohibitive if your grid is very large.
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetDefaultCellAlignment} \label { wxgridsetdefaultcellalignment}
\func { void} { SetDefaultCellAlignment} { \param { int } { horiz} , \param { int } { vert} }
2002-06-07 20:15:28 +00:00
Sets the default horizontal and vertical alignment for grid cell text.
2000-07-21 08:24:18 +00:00
2001-05-24 10:39:33 +00:00
Horizontal alignment should be one of wxALIGN\_ LEFT, wxALIGN\_ CENTRE or wxALIGN\_ RIGHT.
2000-10-10 11:11:36 +00:00
2001-05-24 10:39:33 +00:00
Vertical alignment should be one of wxALIGN\_ TOP, wxALIGN\_ CENTRE or wxALIGN\_ BOTTOM.
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetDefaultCellBackgroundColour} \label { wxgridsetdefaultcellbackgroundcolour}
2000-10-10 11:11:36 +00:00
\func { void} { SetDefaultCellBackgroundColour} { \param { const wxColour\& } { colour} }
2000-07-21 08:24:18 +00:00
Sets the default background colour for grid cells.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetDefaultCellFont} \label { wxgridsetdefaultcellfont}
2000-10-10 11:11:36 +00:00
\func { void} { SetDefaultCellFont} { \param { const wxFont\& } { font} }
2000-07-21 08:24:18 +00:00
Sets the default font to be used for grid cell text.
2005-11-02 16:52:23 +00:00
2004-11-16 20:48:11 +00:00
\membersection { wxGrid::SetDefaultCellTextColour} \label { wxgridsetdefaultcelltextcolour}
\func { void} { SetDefaultCellTextColour} { \param { const wxColour\& } { colour} }
Sets the current default colour for grid cell text.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetDefaultEditor} \label { wxgridsetdefaulteditor}
\func { void} { SetDefaultEditor} { \param { wxGridCellEditor* } { editor} }
Sets the default editor for grid cells. The grid will take ownership of the pointer.
See \helpref { wxGridCellEditor} { wxgridcelleditor} and
the \helpref { wxGrid overview} { gridoverview} for more information about cell editors and renderers.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetDefaultRenderer} \label { wxgridsetdefaultrenderer}
\func { void} { SetDefaultRenderer} { \param { wxGridCellRenderer* } { renderer} }
Sets the default renderer for grid cells. The grid will take ownership of the pointer.
See \helpref { wxGridCellRenderer} { wxgridcellrenderer} and
the \helpref { wxGrid overview} { gridoverview} for more information about cell editors and renderers.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetDefaultColSize} \label { wxgridsetdefaultcolsize}
1999-06-23 11:26:19 +00:00
2003-01-18 00:16:34 +00:00
\func { void} { SetDefaultColSize} { \param { int } { width} , \param { bool } { resizeExistingCols = false} }
1999-06-23 11:26:19 +00:00
2000-07-21 08:24:18 +00:00
Sets the default width for columns in the grid. This will only affect columns subsequently added to
2005-11-02 16:52:23 +00:00
the grid unless resizeExistingCols is true.
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetDefaultRowSize} \label { wxgridsetdefaultrowsize}
2003-01-18 00:16:34 +00:00
\func { void} { SetDefaultRowSize} { \param { int } { height} , \param { bool } { resizeExistingRows = false} }
2000-07-21 08:24:18 +00:00
Sets the default height for rows in the grid. This will only affect rows subsequently added
2003-01-18 00:16:34 +00:00
to the grid unless resizeExistingRows is true.
1999-06-23 11:26:19 +00:00
2005-11-02 16:52:23 +00:00
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::SetGridCursor} \label { wxgridsetgridcursor}
2000-07-21 08:24:18 +00:00
\func { void} { SetGridCursor} { \param { int } { row} , \param { int } { col} }
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
Set the grid cursor to the specified cell.
2000-07-21 08:24:18 +00:00
This function calls \helpref { wxGrid::MakeCellVisible} { wxgridmakecellvisible} .
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetGridLineColour} \label { wxgridsetgridlinecolour}
1998-05-20 14:25:30 +00:00
2000-10-10 11:11:36 +00:00
\func { void} { SetGridLineColour} { \param { const wxColour\& } { colour} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Sets the colour used to draw grid lines.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::SetLabelBackgroundColour} \label { wxgridsetlabelbackgroundcolour}
2000-10-10 11:11:36 +00:00
\func { void} { SetLabelBackgroundColour} { \param { const wxColour\& } { colour} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Sets the background colour for row and column labels.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetLabelFont} \label { wxgridsetlabelfont}
1998-05-20 14:25:30 +00:00
2000-10-10 11:11:36 +00:00
\func { void} { SetLabelFont} { \param { const wxFont\& } { font} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Sets the font for row and column labels.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
1998-05-20 14:25:30 +00:00
\membersection { wxGrid::SetLabelTextColour} \label { wxgridsetlabeltextcolour}
2000-10-10 11:11:36 +00:00
\func { void} { SetLabelTextColour} { \param { const wxColour\& } { colour} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Sets the colour for row and column label text.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::SetMargins} \label { wxgridsetmargins}
\func { void} { SetMargins} { \param { int } { extraWidth} , \param { int } { extraHeight} }
A grid may occupy more space than needed for its rows/columns. This
function allows to set how big this extra space is
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::SetOrCalcColumnSizes} \label { wxgridsetorcalccolumnsizes}
\func { int} { SetOrCalcColumnSizes} { \param { bool } { calcOnly} , \param { bool } { setAsMin = true} }
Common part of AutoSizeColumn/Row() and GetBestSize()
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::SetOrCalcRowSizes} \label { wxgridsetorcalcrowsizes}
\func { int} { SetOrCalcRowSizes} { \param { bool } { calcOnly} , \param { bool } { setAsMin = true} }
2005-11-02 16:52:23 +00:00
2000-07-27 01:29:07 +00:00
\membersection { wxGrid::SetReadOnly} \label { wxgridsetreadonly}
2003-01-18 00:16:34 +00:00
\func { void} { SetReadOnly} { \param { int } { row} , \param { int } { col} , \param { bool } { isReadOnly = true} }
2000-07-27 01:29:07 +00:00
Makes the cell at the specified location read-only or editable.
See also \helpref { wxGrid::IsReadOnly} { wxgridisreadonly} .
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetRowAttr} \label { wxgridsetrowattr}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { SetRowAttr} { \param { int } { row} , \param { wxGridCellAttr* } { attr} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Sets the cell attributes for all cells in the specified row.
See the \helpref { wxGridCellAttr} { wxgridcellattr} class for more information
about controlling cell attributes.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetRowLabelAlignment} \label { wxgridsetrowlabelalignment}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { SetRowLabelAlignment} { \param { int } { horiz} , \param { int } { vert} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Sets the horizontal and vertical alignment of row label text.
1998-05-20 14:25:30 +00:00
2001-05-24 10:39:33 +00:00
Horizontal alignment should be one of wxALIGN\_ LEFT, wxALIGN\_ CENTRE or wxALIGN\_ RIGHT.
2000-10-10 11:11:36 +00:00
2001-05-24 10:39:33 +00:00
Vertical alignment should be one of wxALIGN\_ TOP, wxALIGN\_ CENTRE or wxALIGN\_ BOTTOM.
1998-05-20 14:25:30 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetRowLabelSize} \label { wxgridsetrowlabelsize}
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
\func { void} { SetRowLabelSize} { \param { int } { width} }
1998-05-20 14:25:30 +00:00
2000-07-21 08:24:18 +00:00
Sets the width of the row labels.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetRowLabelValue} \label { wxgridsetrowlabelvalue}
2000-10-10 11:11:36 +00:00
\func { void} { SetRowLabelValue} { \param { int } { row} , \param { const wxString\& } { value} }
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
Set the value for the given row label. If you are using a derived grid table you must
override \helpref { wxGridTableBase::SetRowLabelValue} { wxgridtablebasesetrowlabelvalue}
2000-07-21 08:24:18 +00:00
for this to have any effect.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetRowMinimalHeight} \label { wxgridsetrowminimalheight}
2003-05-18 19:49:43 +00:00
\func { void} { SetRowMinimalHeight} { \param { int } { row} , \param { int } { height} }
2000-07-21 08:24:18 +00:00
Sets the minimal height for the specified row. This should normally be called when creating the grid
because it will not resize a row that is already shorter than the minimal height.
2003-05-18 19:49:43 +00:00
The height argument must be higher than the minimimal acceptable row height, see
\helpref { wxGrid::GetRowMinimalAcceptableHeight} { wxgridgetrowminimalacceptableheight} .
2005-11-02 16:52:23 +00:00
2003-05-18 19:49:43 +00:00
\membersection { wxGrid::SetRowMinimalAcceptableHeight} \label { wxgridsetrowminimalacceptableheight}
\func { void} { SetRowMinimalAcceptableHeight} { \param { int } { height} }
This modifies the minimum row width that can be handled correctly. Specifying a low value here
allows smaller grid cells to be dealt with correctly. Specifying a value here which is much smaller
than the actual minimum size will incur a performance penalty in the functions which perform
grid cell index lookup on the basis of screen coordinates.
This should normally be called when creating the grid because it will not resize existing rows
2005-11-02 16:52:23 +00:00
with sizes smaller than the value specified here.
2003-05-18 19:49:43 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetRowSize} \label { wxgridsetrowsize}
\func { void} { SetRowSize} { \param { int } { row} , \param { int } { height} }
2005-11-02 16:52:23 +00:00
Sets the height of the specified row.
2000-07-21 08:24:18 +00:00
This function does not refresh the grid. If you are calling it outside of a BeginBatch / EndBatch
2005-11-02 16:52:23 +00:00
block you can use \helpref { wxGrid::ForceRefresh} { wxgridforcerefresh} to see the changes.
2000-07-21 08:24:18 +00:00
2003-01-18 00:16:34 +00:00
Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will
2000-07-21 08:24:18 +00:00
also be set as the minimal width for the column.
2000-10-10 11:11:36 +00:00
\wxheading { Note}
2000-07-21 08:24:18 +00:00
wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.
2005-11-02 16:52:23 +00:00
The memory requirements for this could become prohibitive if your grid is very large.
2000-07-21 08:24:18 +00:00
2004-10-14 10:28:20 +00:00
2005-11-02 16:52:23 +00:00
\membersection { wxGrid::SetScrollLineX} \label { wxgridsetscrolllinex}
\func { void} { SetScrollLineX} { \param { int } { x} }
2004-10-14 10:28:20 +00:00
Sets the number of pixels per horizontal scroll increment. The default is 15.
Sometimes wxGrid has trouble setting the scrollbars correctly due to rounding
errors: setting this to 1 can help.
2005-11-02 16:52:23 +00:00
\wxheading { See also}
\helpref { wxGrid::GetScrollLineX} { wxgridgetscrolllinex} ,\rtfsp
\helpref { wxGrid::GetScrollLineY} { wxgridgetscrollliney} ,\rtfsp
\helpref { wxGrid::SetScrollLineY} { wxgridsetscrollliney}
2004-10-14 10:28:20 +00:00
2005-11-02 16:52:23 +00:00
\membersection { wxGrid::SetScrollLineY} \label { wxgridsetscrollliney}
\func { void} { SetScrollLineY} { \param { int } { y} }
2004-10-14 10:28:20 +00:00
Sets the number of pixels per vertical scroll increment. The default is 15.
Sometimes wxGrid has trouble setting the scrollbars correctly due to rounding
errors: setting this to 1 can help.
2005-11-02 16:52:23 +00:00
\wxheading { See also}
\helpref { wxGrid::GetScrollLineX} { wxgridgetscrolllinex} ,\rtfsp
\helpref { wxGrid::GetScrollLineY} { wxgridgetscrollliney} ,\rtfsp
\helpref { wxGrid::SetScrollLineX} { wxgridsetscrolllinex}
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::SetSelectionBackground} \label { wxgridsetselectionbackground}
\func { void} { SetSelectionBackground} { \param { const wxColour\& } { c} }
2005-11-02 16:52:23 +00:00
2004-10-14 10:28:20 +00:00
\membersection { wxGrid::SetSelectionForeground} \label { wxgridsetselectionforeground}
\func { void} { SetSelectionForeground} { \param { const wxColour\& } { c} }
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetSelectionMode} \label { wxgridsetselectionmode}
2000-10-10 11:11:36 +00:00
\func { void} { SetSelectionMode} { \param { wxGrid::wxGridSelectionModes} { selmode} }
2000-07-21 08:24:18 +00:00
Set the selection behaviour of the grid.
\wxheading { Parameters}
\docparam { wxGrid::wxGridSelectCells} { The default mode where individual cells are selected.}
2000-10-10 11:11:36 +00:00
\docparam { wxGrid::wxGridSelectRows} { Selections will consist of whole rows.}
2000-07-21 08:24:18 +00:00
2004-11-16 20:48:11 +00:00
\docparam { wxGrid::wxGridSelectColumns} { Selections will consist of whole columns.}
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::SetTable} \label { wxgridsettable}
2003-01-18 00:16:34 +00:00
\func { bool} { SetTable} { \param { wxGridTableBase* } { table} , \param { bool } { takeOwnership = false} , \param { wxGrid::wxGridSelectionModes } { selmode = wxGrid::wxGridSelectCells} }
2000-07-21 08:24:18 +00:00
2000-09-10 19:01:03 +00:00
Passes a pointer to a custom grid table to be used by the grid. This should be called
2000-07-21 08:24:18 +00:00
after the grid constructor and before using the grid object. If takeOwnership is set to
2005-11-02 16:52:23 +00:00
true then the table will be deleted by the wxGrid destructor.
2000-07-21 08:24:18 +00:00
Use this function instead of \helpref { wxGrid::CreateGrid} { wxgridcreategrid} when your
application involves complex or non-string data or data sets that are too large to fit
2005-11-02 16:52:23 +00:00
wholly in memory.
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::ShowCellEditControl} \label { wxgridshowcelleditcontrol}
\func { void} { ShowCellEditControl} { \void }
Displays the in-place cell edit control for the current cell.
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::XToCol} \label { wxgridxtocol}
2006-06-01 00:13:19 +00:00
\func { int} { XToCol} { \param { int } { x} , \param { bool } { clipToMinMax = false} }
\wxheading { Parameters}
\docparam { x} { The x position to evaluate.}
\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.}
2000-07-21 08:24:18 +00:00
2006-06-01 00:13:19 +00:00
\wxheading { Return value}
The grid column that corresponds to the logical x coordinate. Returns
2004-10-20 11:12:56 +00:00
{ \tt wxNOT\_ FOUND} if there is no column at the x position.
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::XToEdgeOfCol} \label { wxgridxtoedgeofcol}
\func { int} { XToEdgeOfCol} { \param { int } { x} }
Returns the column whose right hand edge is close to the given logical x position.
2004-10-20 11:12:56 +00:00
If no column edge is near to this position { \tt wxNOT\_ FOUND} is returned.
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::YToEdgeOfRow} \label { wxgridytoedgeofrow}
\func { int} { YToEdgeOfRow} { \param { int } { y} }
Returns the row whose bottom edge is close to the given logical y position.
2004-10-20 11:12:56 +00:00
If no row edge is near to this position { \tt wxNOT\_ FOUND} is returned.
2000-07-21 08:24:18 +00:00
2005-11-02 16:52:23 +00:00
2000-07-21 08:24:18 +00:00
\membersection { wxGrid::YToRow} \label { wxgridytorow}
\func { int} { YToRow} { \param { int } { y} }
2006-06-01 00:13:19 +00:00
Returns the grid row that corresponds to the logical y coordinate. Returns
2004-10-20 11:12:56 +00:00
{ \tt wxNOT\_ FOUND} if there is no row at the y position.
2006-02-11 12:05:53 +00:00