1998-05-20 14:25:30 +00:00
|
|
|
\section{\class{wxGrid}}\label{wxgrid}
|
|
|
|
|
|
|
|
wxGrid is a class for displaying and editing tabular information.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxPanel}{wxpanel}\\
|
|
|
|
\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}
|
|
|
|
|
1999-06-23 11:26:19 +00:00
|
|
|
There are no specific window styles for this class, but you may use different
|
|
|
|
SetXXX() functions to change the controls behaviour (for example, to enable
|
|
|
|
in-place editing).
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
See also \helpref{window styles overview}{windowstyles}.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxGrid classes overview}{gridoverview}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxGrid::wxGrid}\label{wxgridconstr}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{void}{wxGrid}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id}, \param{const wxPoint\&}{ pos},
|
|
|
|
\rtfsp\param{const wxSize\&}{ size}, \param{long}{ style=0}, \param{const wxString\& }{name="grid"}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Constructor. Before using a wxGrid object, you must call CreateGrid to set up the required rows and columns.
|
|
|
|
|
|
|
|
\membersection{wxGrid::AdjustScrollbars}\label{wxgridadjustscrollbars}
|
|
|
|
|
|
|
|
\func{void}{AdjustScrollbars}{\void}
|
|
|
|
|
|
|
|
Call this function whenever a change has been made via the API that might alter the scrollbar characteristics:
|
|
|
|
particularly when adding or deleting rows, or changing row or column dimensions. For example,
|
|
|
|
removing rows might make it unnecessary to show the vertical scrollbar.
|
|
|
|
|
|
|
|
\membersection{wxGrid::AppendCols}\label{wxgridappendcols}
|
|
|
|
|
|
|
|
\func{bool}{AppendCols}{\param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
|
|
|
|
|
|
|
|
Appends {\it n} columns to the grid. If {\it updateLabels} is TRUE,
|
|
|
|
the function OnChangeLabels is called to give the application the opportunity to relabel.
|
|
|
|
|
|
|
|
\membersection{wxGrid::AppendRows}\label{wxgridappendrows}
|
|
|
|
|
|
|
|
\func{bool}{AppendRows}{\param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
|
|
|
|
|
|
|
|
Appends {\it n} rows to the grid. If {\it updateLabels} is TRUE,
|
|
|
|
the function OnChangeLabels is called to give the application the opportunity to relabel.
|
|
|
|
|
|
|
|
\membersection{wxGrid::BeginBatch}\label{wxgridbeginbatch}
|
|
|
|
|
|
|
|
\func{void}{BeginBatch}{\void}
|
|
|
|
|
|
|
|
Start a BeginBatch/EndBatch pair between which, calls to SetCellValue or
|
|
|
|
SetCellBitmap will not cause a refresh. This allows you to speed up some operations
|
|
|
|
(for example, setting several hundred cell values). You can nest, but not overlap,
|
|
|
|
these two functions.
|
|
|
|
|
|
|
|
See also \helpref{wxGrid::EndBatch}{wxgridendbatch}, \helpref{wxGrid::GetBatchCount}{wxgridgetbatchcount}.
|
|
|
|
|
|
|
|
\membersection{wxGrid::CellHitTest}\label{wxgridcellhittest}
|
|
|
|
|
|
|
|
\func{bool}{CellHitTest}{\param{int}{ x}, \param{int}{ y}, \param{int *}{row}, \param{int *}{col}}
|
|
|
|
|
|
|
|
Returns TRUE if the x, y panel position coincides with a cell. If so, {\it row} and {\it col} are
|
|
|
|
returned.
|
|
|
|
|
|
|
|
\membersection{wxGrid::CreateGrid}\label{wxgridcreategrid}
|
|
|
|
|
|
|
|
\func{bool}{CreateGrid}{\param{int}{ rows}, \param{int}{ cols}, \param{wxString **}{cellValues=NULL},
|
|
|
|
\param{short *}{widths=NULL}, \param{short}{ defaultWidth=wxGRID\_DEFAULT\_CELL\_WIDTH},
|
|
|
|
\param{short}{ defaultHeight=wxGRID\_DEFAULT\_CELL\_HEIGHT}}
|
|
|
|
|
|
|
|
Creates a grid {\it rows} high and {\it cols} wide. You can optionally specify an array of initial values
|
|
|
|
and widths, and/or default cell width and height.
|
|
|
|
|
|
|
|
Call this function after creating the wxGrid object.
|
|
|
|
|
1999-02-24 08:17:50 +00:00
|
|
|
\pythonnote{Currently the \tt{cellValues} and \tt{widths} parameters
|
|
|
|
don't exisit in the wxPython version of this method. So in other
|
|
|
|
words, the definition of the wxPython version of this method looks like this:
|
|
|
|
\begin{verbatim}
|
|
|
|
CreateGrid(rows, cols,
|
|
|
|
defaultWidth = wxGRID_DEFAULT_CELL_WIDTH,
|
|
|
|
defaultHeight = wxGRID_DEFAULT_CELL_HEIGHT)
|
|
|
|
\end{verbatim}
|
|
|
|
}
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxGrid::CurrentCellVisible}\label{wxgridcurrentcellvisible}
|
|
|
|
|
|
|
|
\func{bool}{CurrentCellVisible}{\void}
|
|
|
|
|
|
|
|
Returns TRUE if the currently selected cell is visible, FALSE otherwise.
|
|
|
|
|
|
|
|
\membersection{wxGrid::DeleteCols}\label{wxgriddeletecols}
|
|
|
|
|
|
|
|
\func{bool}{DeleteCols}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
|
|
|
|
|
|
|
|
Deletes {\it n} columns from the grid at position {\it pos}. If {\it updateLabels} is TRUE,
|
|
|
|
the function OnChangeLabels is called to give the application the opportunity to relabel.
|
|
|
|
|
|
|
|
\membersection{wxGrid::DeleteRows}\label{wxgriddeleterows}
|
|
|
|
|
|
|
|
\func{bool}{DeleteRows}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
|
|
|
|
|
|
|
|
Deletes {\it n} rows from the grid at position {\it pos}. If {\it updateLabels} is TRUE,
|
|
|
|
the function OnChangeLabels is called to give the application the opportunity to relabel.
|
|
|
|
|
|
|
|
\membersection{wxGrid::EndBatch}\label{wxgridendbatch}
|
|
|
|
|
|
|
|
\func{void}{EndBatch}{\void}
|
|
|
|
|
|
|
|
End a BeginBatch/EndBatch pair between which, calls to SetCellValue or
|
|
|
|
SetCellBitmap will not cause a refresh. This allows you to speed up some operations
|
|
|
|
(for example, setting several hundred cell values). You can nest, but not overlap,
|
|
|
|
these two functions.
|
|
|
|
|
|
|
|
See also \helpref{wxGrid::BeginBatch}{wxgridbeginbatch}, \helpref{wxGrid::GetBatchCount}{wxgridgetbatchcount}.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetBatchCount}\label{wxgridgetbatchcount}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{int}{GetBatchCount}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Return the level of batch nesting. This is initially zero, and will be incremented
|
|
|
|
every time BeginBatch is called, and decremented when EndBatch is called. When the
|
|
|
|
batch count is more zero, some functions (such as SetCellValue and SetCellBitmap) will
|
|
|
|
not refresh the cell.
|
|
|
|
|
|
|
|
See also \helpref{wxGrid::BeginBatch}{wxgridbeginbatch}, \helpref{wxGrid::EndBatch}{wxgridendbatch}.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetCell}\label{wxgridgetcell}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxGridCell *}{GetCell}{\param{int}{ row}, \param{int}{ col}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns the grid cell object associated with this position.
|
|
|
|
|
|
|
|
wxGenericGrid implementation only.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetCellAlignment}\label{wxgridgetcellalignment}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{int}{GetCellAlignment}{\param{int}{ row}, \param{int}{ col}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{int}{GetCellAlignment}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Sets the text alignment for the cell at the given position, or the global alignment value.
|
|
|
|
The return value is wxLEFT, wxRIGHT or wxCENTRE.
|
|
|
|
|
1999-02-24 08:17:50 +00:00
|
|
|
\pythonnote{In place of a single overloaded method name, wxPython
|
|
|
|
implements the following methods:\par
|
|
|
|
\indented{2cm}{\begin{twocollist}
|
|
|
|
\twocolitem{\bf{GetCellAlignment(row, col)}}{}
|
|
|
|
\twocolitem{\bf{GetDefCellAlignment()}}{}
|
|
|
|
\end{twocollist}}
|
|
|
|
}
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxGrid::GetCellBackgroundColour}\label{wxgridgetcellbackgroundcolour}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxColour\&}{GetCellBackgroundColour}{\param{int}{ row}, \param{int}{ col}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxColour\&}{GetCellBackgroundColour}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Gets the background colour for the cell at the given position, or the global background colour.
|
|
|
|
|
1999-02-24 08:17:50 +00:00
|
|
|
\pythonnote{In place of a single overloaded method name, wxPython
|
|
|
|
implements the following methods:\par
|
|
|
|
\indented{2cm}{\begin{twocollist}
|
|
|
|
\twocolitem{\bf{GetCellBackgroundColour(row, col)}}{}
|
|
|
|
\twocolitem{\bf{GetDefCellBackgroundColourt()}}{}
|
|
|
|
\end{twocollist}}
|
|
|
|
}
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxGrid::GetCells}\label{wxgridgetcells}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxGridCell ***}{GetCells}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns the array of grid cell object associated with this wxGrid.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetCellTextColour}\label{wxgridgetcelltextcolour}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxColour\&}{GetCellTextColour}{\param{int}{ row}, \param{int}{ col}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxColour\&}{GetCellTextColour}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Gets the text colour for the cell at the given position, or the global text colour.
|
|
|
|
|
1999-02-24 08:17:50 +00:00
|
|
|
\pythonnote{In place of a single overloaded method name, wxPython
|
|
|
|
implements the following methods:\par
|
|
|
|
\indented{2cm}{\begin{twocollist}
|
|
|
|
\twocolitem{\bf{GetCellTextColour(row, col)}}{}
|
|
|
|
\twocolitem{\bf{GetDefCellTextColour()}}{}
|
|
|
|
\end{twocollist}}
|
|
|
|
}
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxGrid::GetCellTextFont}\label{wxgridgetcelltextfont}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{const wxFont\&}{GetCellTextFont}{\param{int}{ row}, \param{int}{ col}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxFont\&}{GetCellTextFont}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Gets the text font for the cell at the given position, or the global text font.
|
|
|
|
|
1999-02-24 08:17:50 +00:00
|
|
|
\pythonnote{In place of a single overloaded method name, wxPython
|
|
|
|
implements the following methods:\par
|
|
|
|
\indented{2cm}{\begin{twocollist}
|
|
|
|
\twocolitem{\bf{GetCellTextFont(row, col)}}{}
|
|
|
|
\twocolitem{\bf{GetDefCellTextFont()}}{}
|
|
|
|
\end{twocollist}}
|
|
|
|
}
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxGrid::GetCellValue}\label{wxgridgetcellvalue}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxString\&}{GetCellValue}{\param{int}{ row}, \param{int}{ col}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns the cell value at the given position.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetCols}\label{wxgridgetcols}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{int}{GetCols}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns the number of columns in the grid.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetColumnWidth}\label{wxgridcolumnwidth}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{int}{GetColumnWidth}{\param{int}{ col}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Gets the width in pixels for column {\it col}.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetCurrentRect}\label{wxgridgetcurrentrect}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxRectangle *}{GetCurrentRect}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns a pointer to the rectangle enclosing the currently selected cell.
|
|
|
|
Do not delete this pointer.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetCursorColumn}\label{wxgridgetcursorcolumn}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{int}{GetCursorColumn}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns the column position of the currently selected cell.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetCursorRow}\label{wxgridgetcursorrow}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{int}{GetCursorRow}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns the row position of the currently selected cell.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetEditable}\label{wxgridgeteditable}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{bool}{GetEditable}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns TRUE if the grid cells can be edited.
|
|
|
|
|
1999-06-23 11:26:19 +00:00
|
|
|
\membersection{wxGrid::GetEditInPlace}\label{wxgridgeteditinplace}
|
|
|
|
|
|
|
|
\constfunc{bool}{GetEditInPlace}{\void}
|
|
|
|
|
|
|
|
Returns TRUE if editing in-place is enabled.
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxGrid::GetHorizScrollBar}\label{wxgridgethorizscrollbar}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxScrollBar *}{GetHorizScrollBar}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns a pointer to the horizontal scrollbar.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetLabelAlignment}\label{wxgridgetlabelalignment}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{int}{GetLabelAlignment}{\param{int}{ orientation}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Gets the row or column label alignment. {\it orientation} should
|
|
|
|
be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
|
|
|
|
{\it alignment} should be wxCENTRE, wxLEFT or wxRIGHT.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetLabelBackgroundColour}\label{wxgridgetlabelbackgroundcolour}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxColour\&}{GetLabelBackgroundColour}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Gets a row and column label text colour.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetLabelSize}\label{wxgridgetlabelsize}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{int}{GetLabelSize}{\param{int}{ orientation}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Gets the row label height, or column label width, in pixels. {\it orientation} should
|
|
|
|
be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetLabelTextColour}\label{wxgridgetlabeltextcolour}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxColour\&}{GetLabelTextColour}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Gets a row and column label text colour.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetLabelTextFont}\label{wxgridgetlabeltextfont}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxFont\&}{GetLabelTextFont}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Gets the font to be used for the row and column labels.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetLabelValue}\label{wxgridgetlabelvalue}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxString\&}{GetLabelValue}{\param{int}{ orientation}, \param{int}{ pos}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Gets a row or column label value. {\it orientation} should
|
|
|
|
be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
|
|
|
|
{\it pos} is the label position.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetRowHeight}\label{wxgridgetrowheight}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{int}{GetRowHeight}{\param{int}{ row}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Gets the height in pixels for row {\it row}.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetRows}\label{wxgridgetrows}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{int}{GetRows}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns the number of rows in the grid.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetScrollPosX}\label{wxgridgetscrollposx}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{int}{GetScrollPosX}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns the column scroll position.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetScrollPosY}\label{wxgridgetscrollposy}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{int}{GetScrollPosY}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns the row scroll position.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetTextItem}\label{wxgridgettextitem}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxText *}{GetTextItem}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns a pointer to the text item used for entering text into a cell.
|
|
|
|
|
|
|
|
\membersection{wxGrid::GetVertScrollBar}\label{wxgridgetvertscrollbar}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\constfunc{wxScrollBar *}{GetVertScrollBar}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns a pointer to the vertical scrollbar.
|
|
|
|
|
|
|
|
\membersection{wxGrid::InsertCols}\label{wxgridinsertcols}
|
|
|
|
|
|
|
|
\func{bool}{InsertCols}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
|
|
|
|
|
|
|
|
Inserts {\it n} number of columns before position {\it pos}. If {\it updateLabels} is TRUE,
|
|
|
|
the function OnChangeLabels is called to give the application the opportunity to relabel.
|
|
|
|
|
|
|
|
\membersection{wxGrid::InsertRows}\label{wxgridinsertrows}
|
|
|
|
|
|
|
|
\func{bool}{InsertRows}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
|
|
|
|
|
|
|
|
Inserts {\it n} number of rows before position {\it pos}. If {\it updateLabels} is TRUE,
|
|
|
|
the function OnChangeLabels is called to give the application the opportunity to relabel.
|
|
|
|
|
|
|
|
\membersection{wxGrid::OnActivate}\label{wxgridonactivate}
|
|
|
|
|
|
|
|
\func{void}{OnActivate}{\param{bool}{ active}}
|
|
|
|
|
|
|
|
Sets the text item to have the focus. Call this function when the wxGrid window should have the
|
|
|
|
focus, for example from wxFrame::OnActivate.
|
|
|
|
|
|
|
|
\membersection{wxGrid::OnChangeLabels}\label{wxgridonchangelabels}
|
|
|
|
|
|
|
|
\func{void}{OnChangeLabels}{\void}
|
|
|
|
|
|
|
|
Called when rows and columns are created or deleted, to allow the application an
|
|
|
|
opportunity to update the labels. By default, columns are labelled alphabetically,
|
|
|
|
and rows numerically.
|
|
|
|
|
|
|
|
\membersection{wxGrid::OnChangeSelectionLabel}\label{wxgridonchangeselectionlabel}
|
|
|
|
|
|
|
|
\func{void}{OnChangeSelectionLabel}{\void}
|
|
|
|
|
|
|
|
Called when a cell is selected, to allow the application an
|
|
|
|
opportunity to update the selection label (the label of the wxText item
|
|
|
|
used for entering cell text). By default, the cell column letter and row
|
|
|
|
number are concatenated to form the selection label.
|
|
|
|
|
|
|
|
\membersection{wxGrid::OnCreateCell}\label{wxgridoncreatecell}
|
|
|
|
|
|
|
|
\func{wxGridCell *}{OnCreateCell}{\void}
|
|
|
|
|
|
|
|
Override this virtual function if you want to replace the normal wxGridCell with a derived
|
|
|
|
class.
|
|
|
|
|
|
|
|
\membersection{wxGrid::OnCellLeftClick}\label{wxgridoncellleftclick}
|
|
|
|
|
|
|
|
\func{void}{OnLeftClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}}
|
|
|
|
|
|
|
|
Virtual function called when the left button is depressed within a cell, just after OnSelectCell is called.
|
|
|
|
|
|
|
|
\membersection{wxGrid::OnCellRightClick}\label{wxgridoncellrightclick}
|
|
|
|
|
|
|
|
\func{void}{OnRightClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}}
|
|
|
|
|
|
|
|
Virtual function called when the right button is depressed within a cell, just after OnSelectCell is called.
|
|
|
|
|
|
|
|
\membersection{wxGrid::OnLabelLeftClick}\label{wxgridonlabelleftclick}
|
|
|
|
|
|
|
|
\func{void}{OnLeftClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}}
|
|
|
|
|
|
|
|
Virtual function called when the left button is depressed within a
|
1999-02-24 08:17:50 +00:00
|
|
|
label.
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
{\it row} will be {\it -1} if the click is in the top labels.
|
|
|
|
|
|
|
|
{\it col} will be {\it -1} if the click is in the left labels.
|
|
|
|
|
|
|
|
{\it row} and {\it col} will be {\it -1} if the click is in the upper
|
|
|
|
left corner.
|
|
|
|
|
|
|
|
\membersection{wxGrid::OnLabelRightClick}\label{wxgridonlabelrightclick}
|
|
|
|
|
|
|
|
\func{void}{OnRightClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}}
|
|
|
|
|
|
|
|
Virtual function called when the right button is depressed within a label.
|
|
|
|
|
|
|
|
{\it row} will be {\it -1} if the click is in the top labels.
|
|
|
|
|
|
|
|
{\it col} will be {\it -1} if the click is in the left labels.
|
|
|
|
|
|
|
|
{\it row} and {\it col} will be {\it -1} if the click is in the upper
|
|
|
|
left corner.
|
|
|
|
|
|
|
|
\membersection{wxGrid::OnSelectCell}\label{wxgridonselectcell}
|
|
|
|
|
|
|
|
\func{void}{OnSelectCell}{\param{int}{ row}, \param{int}{ col}}
|
|
|
|
|
|
|
|
Virtual function called when the user left-clicks on a cell.
|
|
|
|
|
|
|
|
\membersection{wxGrid::OnSelectCellImplementation}\label{wxgridonselectcellimplementation}
|
|
|
|
|
|
|
|
\func{void}{OnSelectCellImplementation}{\param{wxDC *}{dc}, \param{int}{ row}, \param{int}{ col}}
|
|
|
|
|
|
|
|
Virtual function called when the user left-clicks on a cell. If you override this function,
|
|
|
|
call wxGrid::OnSelectCell to apply the default behaviour.
|
|
|
|
|
|
|
|
\membersection{wxGrid::SetCellAlignment}\label{wxgridsetcellalignment}
|
|
|
|
|
|
|
|
\func{void}{SetCellAlignment}{\param{int}{ alignment}, \param{int}{ row}, \param{int}{ col}}
|
|
|
|
|
|
|
|
\func{void}{SetCellAlignment}{\param{int}{ alignment}}
|
|
|
|
|
|
|
|
Sets the text alignment for the cell at the given position, or for the whole grid. {\it alignment} may be wxLEFT, wxRIGHT or wxCENTRE.
|
|
|
|
|
1999-02-24 08:17:50 +00:00
|
|
|
\pythonnote{In place of a single overloaded method name, wxPython
|
|
|
|
implements the following methods:\par
|
|
|
|
\indented{2cm}{\begin{twocollist}
|
|
|
|
\twocolitem{\bf{SetCellAlignment(alignment, row, col)}}{}
|
|
|
|
\twocolitem{\bf{SetDefCellAlignment(alignment)}}{}
|
|
|
|
\end{twocollist}}
|
|
|
|
}
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxGrid::SetCellBackgroundColour}\label{wxgridsetcellbackgroundcolour}
|
|
|
|
|
|
|
|
\func{void}{SetCellBackgroundColour}{\param{const wxColour\&}{ colour}, \param{int}{ row}, \param{int}{ col}}
|
|
|
|
|
|
|
|
\func{void}{SetCellBackgroundColour}{\param{const wxColour\&}{ colour}}
|
|
|
|
|
|
|
|
Sets the background colour for the cell at the given position, or for the whole grid.
|
|
|
|
|
1999-02-24 08:17:50 +00:00
|
|
|
\pythonnote{In place of a single overloaded method name, wxPython
|
|
|
|
implements the following methods:\par
|
|
|
|
\indented{2cm}{\begin{twocollist}
|
|
|
|
\twocolitem{\bf{SetCellBackgroundColour(colour, row, col)}}{}
|
|
|
|
\twocolitem{\bf{SetDefCellBackgroundColour(colour)}}{}
|
|
|
|
\end{twocollist}}
|
|
|
|
}
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxGrid::SetCellTextColour}\label{wxgridsetcelltextcolour}
|
|
|
|
|
|
|
|
\func{void}{SetCellTextColour}{\param{const wxColour\&}{ colour}, \param{int}{ row}, \param{int}{ col}}
|
|
|
|
|
|
|
|
\func{void}{SetCellTextColour}{\param{const wxColour\&}{ colour}}
|
|
|
|
|
|
|
|
Sets the text colour for the cell at the given position, or for the whole grid.
|
|
|
|
|
1999-02-24 08:17:50 +00:00
|
|
|
\pythonnote{In place of a single overloaded method name, wxPython
|
|
|
|
implements the following methods:\par
|
|
|
|
\indented{2cm}{\begin{twocollist}
|
|
|
|
\twocolitem{\bf{SetCellTextColour(colour, row, col)}}{}
|
|
|
|
\twocolitem{\bf{SetDefCellTextColour(colour)}}{}
|
|
|
|
\end{twocollist}}
|
|
|
|
}
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxGrid::SetCellTextFont}\label{wxgridsetcelltextfont}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\func{void}{SetCellTextFont}{\param{const wxFont\&}{ font}, \param{int}{ row}, \param{int}{ col}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\func{void}{SetCellTextFont}{\param{const wxFont\&}{ font}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Sets the text font for the cell at the given position, or for the whole grid.
|
|
|
|
|
1999-02-24 08:17:50 +00:00
|
|
|
\pythonnote{In place of a single overloaded method name, wxPython
|
|
|
|
implements the following methods:\par
|
|
|
|
\indented{2cm}{\begin{twocollist}
|
|
|
|
\twocolitem{\bf{SetCellTextFont(font, row, col)}}{}
|
|
|
|
\twocolitem{\bf{SetDefCellTextFont(font)}}{}
|
|
|
|
\end{twocollist}}
|
|
|
|
}
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxGrid::SetCellValue}\label{wxgridsetcellvalue}
|
|
|
|
|
|
|
|
\func{void}{SetCellValue}{\param{const wxString\&}{ val}, \param{int}{ row}, \param{int}{ col}}
|
|
|
|
|
|
|
|
Sets the cell value at the given position.
|
|
|
|
|
|
|
|
\membersection{wxGrid::SetColumnWidth}\label{wxgridsetcolumnwidth}
|
|
|
|
|
|
|
|
\func{void}{SetColumnWidth}{\param{int}{ col}, \param{int}{ width}}
|
|
|
|
|
|
|
|
Sets the width in pixels for column {\it col}.
|
|
|
|
|
|
|
|
\membersection{wxGrid::SetDividerPen}\label{wxgridsetdividerpen}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\func{void}{SetDividerPen}{\param{const wxPen\&}{ pen}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Specifies the pen to be used for drawing the divisions between cells. The default
|
|
|
|
is a light grey. If NULL is specified, the divisions will not be drawn.
|
|
|
|
|
|
|
|
\membersection{wxGrid::SetEditable}\label{wxgridseteditable}
|
|
|
|
|
|
|
|
\func{void}{SetEditable}{\param{bool}{ editable}}
|
|
|
|
|
|
|
|
If {\it editable} is TRUE (the default), the grid cells will be editable by means of the
|
|
|
|
text edit control. If FALSE, the text edit control will be hidden and the user will not
|
|
|
|
be able to edit the cell contents.
|
|
|
|
|
1999-06-23 11:26:19 +00:00
|
|
|
\membersection{wxGrid::SetEditInPlace}\label{wxgridseteditinplace}
|
|
|
|
|
|
|
|
\func{void}{SetEditInPlace}{\param{bool}{ edit = TRUE}}
|
|
|
|
|
|
|
|
Enables (if {\it edit} is TRUE, default value) or disables in-place editing.
|
|
|
|
When it is enabled, the cells contents can be changed by typing text directly
|
|
|
|
in the cell.
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxGrid::SetGridCursor}\label{wxgridsetgridcursor}
|
|
|
|
|
|
|
|
\func{void}{SetGridCursor}{\param{int }{row}, \param{int}{ col}}
|
|
|
|
|
|
|
|
Sets the position of the selected cell.
|
|
|
|
|
|
|
|
\membersection{wxGrid::SetLabelAlignment}\label{wxgridsetlabelalignment}
|
|
|
|
|
|
|
|
\func{void}{SetLabelAlignment}{\param{int}{ orientation}, \param{int}{ alignment}}
|
|
|
|
|
|
|
|
Sets the row or column label alignment. {\it orientation} should
|
|
|
|
be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
|
|
|
|
{\it alignment} should be wxCENTRE, wxLEFT or wxRIGHT.
|
|
|
|
|
|
|
|
\membersection{wxGrid::SetLabelBackgroundColour}\label{wxgridsetlabelbackgroundcolour}
|
|
|
|
|
|
|
|
\func{void}{SetLabelBackgroundColour}{\param{const wxColour\&}{ value}}
|
|
|
|
|
|
|
|
Sets a row or column label background colour.
|
|
|
|
|
|
|
|
\membersection{wxGrid::SetLabelSize}\label{wxgridsetlabelsize}
|
|
|
|
|
|
|
|
\func{void}{SetLabelSize}{\param{int}{ orientation}, \param{int}{ size}}
|
|
|
|
|
|
|
|
Sets the row label height, or column label width, in pixels. {\it orientation} should
|
|
|
|
be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.
|
|
|
|
|
|
|
|
If a dimension of zero is specified, the row or column labels will not be
|
|
|
|
shown.
|
|
|
|
|
|
|
|
\membersection{wxGrid::SetLabelTextColour}\label{wxgridsetlabeltextcolour}
|
|
|
|
|
|
|
|
\func{void}{SetLabelTextColour}{\param{const wxColour\&}{ value}}
|
|
|
|
|
|
|
|
Sets a row and column label text colour.
|
|
|
|
|
|
|
|
\membersection{wxGrid::SetLabelTextFont}\label{wxgridsetlabeltextfont}
|
|
|
|
|
1998-12-08 23:26:18 +00:00
|
|
|
\func{void}{SetLabelTextFont}{\param{const wxFont\&}{ font}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Sets the font to be used for the row and column labels.
|
|
|
|
|
|
|
|
\membersection{wxGrid::SetLabelValue}\label{wxgridsetlabelvalue}
|
|
|
|
|
|
|
|
\func{void}{SetLabelValue}{\param{int}{ orientation}, \param{const wxString\&}{ value}, \param{int}{ pos}}
|
|
|
|
|
|
|
|
Sets a row or column label value. {\it orientation} should
|
|
|
|
be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
|
|
|
|
{\it pos} is the label position.
|
|
|
|
|
|
|
|
\membersection{wxGrid::SetRowHeight}\label{wxgridsetrowheight}
|
|
|
|
|
|
|
|
\func{void}{SetRowHeight}{\param{int}{ row}, \param{int}{ height}}
|
|
|
|
|
|
|
|
Sets the height in pixels for row {\it row}.
|
|
|
|
|
|
|
|
\membersection{wxGrid::UpdateDimensions}\label{wxgridupdatedimensions}
|
|
|
|
|
|
|
|
\func{void}{UpdateDimensions}{\void}
|
|
|
|
|
|
|
|
Call this function whenever a change has been made via the API that
|
|
|
|
might alter size characteristics. You may also need to follow it with
|
|
|
|
a call to AdjustScrollbars.
|
|
|
|
|
|
|
|
|