📄 grid.tex
字号:
\func{int}{GetDefaultRowLabelSize}{\void}Returns the default width for the row labels.\membersection{wxGrid::GetDefaultRowSize}\label{wxgridgetdefaultrowsize}\func{int}{GetDefaultRowSize}{\void}Returns the current default height for grid rows.\membersection{wxGrid::GetGridCursorCol}\label{wxgridgetgridcursorcol}\func{int}{GetGridCursorCol}{\void}Returns the current grid cell column position.\membersection{wxGrid::GetGridCursorRow}\label{wxgridgetgridcursorrow}\func{int}{GetGridCursorRow}{\void}Returns the current grid cell row position.\membersection{wxGrid::GetGridLineColour}\label{wxgridgetgridlinecolour}\func{wxColour}{GetGridLineColour}{\void}Returns the colour used for grid lines.\wxheading{See also}\helpref{GetDefaultGridLinePen()}{wxgridgetdefaultgridlinepen}\membersection{wxGrid::GetDefaultGridLinePen}\label{wxgridgetdefaultgridlinepen}\func{wxPen}{GetDefaultGridLinePen}{\void}Returns the pen used for grid lines. This virtual function may be overridden inderived classes in order to change the appearance of grid lines. Note thatcurrently the pen width must be $1$.\wxheading{See also}\helpref{GetColGridLinePen()}{wxgridgetcolgridlinepen},\\\helpref{GetRowGridLinePen()}{wxgridgetrowgridlinepen}\membersection{wxGrid::GetRowGridLinePen}\label{wxgridgetrowgridlinepen}\func{wxPen}{GetRowGridLinePen}{\param{int }{row}}Returns the pen used for horizontal grid lines. This virtual function may beoverridden in derived classes in order to change the appearance of individualgrid line for the given row \arg{row}.Example: \\\\\begin{verbatim} // in a grid displaying music notation, use a solid black pen between // octaves (C0=row 127, C1=row 115 etc.) wxPen MidiGrid::GetRowGridLinePen(int row) { if ( row%12 == 7 ) return wxPen(*wxBLACK, 1, wxSOLID); else return GetDefaultGridLinePen(); }\end{verbatim}\membersection{wxGrid::GetColGridLinePen}\label{wxgridgetcolgridlinepen}\func{wxPen}{GetColGridLinePen}{\param{int }{col}}Returns the pen used for vertical grid lines. This virtual function may beoverridden in derived classes in order to change the appearance of individualgrid lines for the given column \arg{col}.See \helpref{GetRowGridLinePen()}{wxgridgetrowgridlinepen} for an example.\membersection{wxGrid::GridLinesEnabled}\label{wxgridgridlinesenabled}\func{bool}{GridLinesEnabled}{\void}Returns true if drawing of grid lines is turned on, false otherwise.\membersection{wxGrid::GetLabelBackgroundColour}\label{wxgridgetlabelbackgroundcolour}\func{wxColour}{GetLabelBackgroundColour}{\void}Returns the colour used for the background of row and column labels.\membersection{wxGrid::GetLabelFont}\label{wxgridgetlabelfont}\func{wxFont}{GetLabelFont}{\void}Returns the font used for row and column labels.\membersection{wxGrid::GetLabelTextColour}\label{wxgridgetlabeltextcolour}\func{wxColour}{GetLabelTextColour}{\void}Returns the colour used for row and column label text.\membersection{wxGrid::GetNumberCols}\label{wxgridgetnumbercols}\func{int}{GetNumberCols}{\void}Returns the total number of grid columns (actually the number of columns in the underlying gridtable).\membersection{wxGrid::GetNumberRows}\label{wxgridgetnumberrows}\func{int}{GetNumberRows}{\void}Returns the total number of grid rows (actually the number of rows in the underlying grid table).\membersection{wxGrid::GetOrCreateCellAttr}\label{wxgridgetorcreatecellattr}\constfunc{wxGridCellAttr*}{GetOrCreateCellAttr}{\param{int }{row}, \param{int }{col}}\membersection{wxGrid::GetRowMinimalAcceptableHeight}\label{wxgridgetrowminimalacceptableheight}\func{int}{GetRowMinimalAcceptableHeight}{}This returns the value of the lowest row width that can be handled correctly. Seemember \helpref{SetRowMinimalAcceptableHeight}{wxgridsetrowminimalacceptableheight} for details.\membersection{wxGrid::GetRowMinimalHeight}\label{wxgridgetrowminimalheight}\constfunc{int}{GetRowMinimalHeight}{\param{int }{col}}\membersection{wxGrid::GetRowLabelAlignment}\label{wxgridgetrowlabelalignment}\func{void}{GetRowLabelAlignment}{\param{int* }{horiz}, \param{int* }{vert}}Sets the arguments to the current row label alignment values.Horizontal alignment will be one of wxLEFT, wxCENTRE or wxRIGHT. \\Vertical alignment will be one of wxTOP, wxCENTRE or wxBOTTOM.\perlnote{This method takes no parameters andreturns a 2-element list {\tt ( horiz, vert )}.}\membersection{wxGrid::GetRowLabelSize}\label{wxgridgetrowlabelsize}\func{int}{GetRowLabelSize}{\void}Returns the current width of the row labels.\membersection{wxGrid::GetRowLabelValue}\label{wxgridgetrowlabelvalue}\func{wxString}{GetRowLabelValue}{\param{int }{row}}Returns the specified row label. The default grid table class provides numeric row labels.If you are using a custom grid table you can override\helpref{wxGridTableBase::GetRowLabelValue}{wxgridtablebasegetcollabelvalue} to provideyour own labels.\membersection{wxGrid::GetRowSize}\label{wxgridgetrowsize}\func{int}{GetRowSize}{\param{int }{row}}Returns the height of the specified row.\membersection{wxGrid::GetScrollLineX}\label{wxgridgetscrolllinex}\constfunc{int}{GetScrollLineX}{\void}Returns the number of pixels per horizontal scroll increment. The default is 15.\wxheading{See also}\helpref{wxGrid::GetScrollLineY}{wxgridgetscrollliney},\rtfsp\helpref{wxGrid::SetScrollLineX}{wxgridsetscrolllinex},\rtfsp\helpref{wxGrid::SetScrollLineY}{wxgridsetscrollliney}\membersection{wxGrid::GetScrollLineY}\label{wxgridgetscrollliney}\constfunc{int}{GetScrollLineY}{\void}Returns the number of pixels per vertical scroll increment. The default is 15.\wxheading{See also}\helpref{wxGrid::GetScrollLineX}{wxgridgetscrolllinex},\rtfsp\helpref{wxGrid::SetScrollLineX}{wxgridsetscrolllinex},\rtfsp\helpref{wxGrid::SetScrollLineY}{wxgridsetscrollliney}\membersection{wxGrid::GetSelectionMode}\label{wxgridgetselectionmode}\constfunc{wxGrid::wxGridSelectionModes}{GetSelectionMode}{\void}Returns the current selection mode, see \helpref{wxGrid::SetSelectionMode}{wxgridsetselectionmode}.\membersection{wxGrid::GetSelectedCells}\label{wxgridgetselectedcells}\constfunc{wxGridCellCoordsArray}{GetSelectedCells}{\void}Returns an array of singly selected cells.\membersection{wxGrid::GetSelectedCols}\label{wxgridgetselectedcols}\constfunc{wxArrayInt}{GetSelectedCols}{\void}Returns an array of selected cols.\membersection{wxGrid::GetSelectedRows}\label{wxgridgetselectedrows}\constfunc{wxArrayInt}{GetSelectedRows}{\void}Returns an array of selected rows.\membersection{wxGrid::GetSelectionBackground}\label{wxgridgetselectionbackground}\constfunc{wxColour}{GetSelectionBackground}{\void}Access or update the selection fore/back colours\membersection{wxGrid::GetSelectionBlockTopLeft}\label{wxgridgetselectionblocktopleft}\constfunc{wxGridCellCoordsArray}{GetSelectionBlockTopLeft}{\void}Returns an array of the top left corners of blocks of selected cells,see \helpref{wxGrid::GetSelectionBlockBottomRight}{wxgridgetselectionblockbottomright}.\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}.\membersection{wxGrid::GetSelectionForeground}\label{wxgridgetselectionforeground}\constfunc{wxColour}{GetSelectionForeground}{\void}\membersection{wxGrid::GetTable}\label{wxgridgettable}\constfunc{wxGridTableBase *}{GetTable}{\void}Returns a base pointer to the current table object.\membersection{wxGrid::GetViewWidth}\label{wxgridgetviewwidth}\func{int}{GetViewWidth}{\void}Returned number of whole cols visible.\membersection{wxGrid::HideCellEditControl}\label{wxgridhidecelleditcontrol}\func{void}{HideCellEditControl}{\void}Hides the in-place cell edit control.\membersection{wxGrid::InitColWidths}\label{wxgridinitcolwidths}\func{void}{InitColWidths}{\void}Init the m\_colWidths/Rights arrays\membersection{wxGrid::InitRowHeights}\label{wxgridinitrowheights}\func{void}{InitRowHeights}{\void}NB: {\it never} access m\_row/col arrays directly because they are createdon demand, {\it always} use accessor functions instead!Init the m\_rowHeights/Bottoms arrays with default values.\membersection{wxGrid::InsertCols}\label{wxgridinsertcols}\func{bool}{InsertCols}{\param{int }{pos = 0}, \param{int }{numCols = 1}, \param{bool }{updateLabels = true}}Inserts one or more new columns into a grid with the first new column at thespecified position and returns true if successful. The updateLabels argument is notused at present.The sequence of actions begins with the grid object requesting the underlying gridtable to insert new columns. If this is successful the table notifies the grid and thegrid updates the display. For a default grid (one where you have called\helpref{wxGrid::CreateGrid}{wxgridcreategrid}) this process is automatic. If you areusing a custom grid table (specified with \helpref{wxGrid::SetTable}{wxgridsettable})then you must override\helpref{wxGridTableBase::InsertCols}{wxgridtablebaseinsertcols} in your derivedtable class.\membersection{wxGrid::InsertRows}\label{wxgridinsertrows}\func{bool}{InsertRows}{\param{int }{pos = 0}, \param{int }{numRows = 1}, \param{bool }{updateLabels = true}}Inserts one or more new rows into a grid with the first new row at the specifiedposition and returns true if successful. The updateLabels argument is not used atpresent.The sequence of actions begins with the grid object requesting the underlying gridtable to insert new rows. If this is successful the table notifies the grid and thegrid updates the display. For a default grid (one where you have called\helpref{wxGrid::CreateGrid}{wxgridcreategrid}) this process is automatic. If you areusing a custom grid table (specified with \helpref{wxGrid::SetTable}{wxgridsettable})then you must override\helpref{wxGridTableBase::InsertRows}{wxgridtablebaseinsertrows} in your derivedtable class.\membersection{wxGrid::IsCellEditControlEnabled}\label{wxgridiscelleditcontrolenabled}\constfunc{bool}{IsCellEditControlEnabled}{\void}Returns true if the in-place edit control is currently enabled.\membersection{wxGrid::IsCurrentCellReadOnly}\label{wxgridiscurrentcellreadonly}\constfunc{bool}{IsCurrentCellReadOnly}{\void}Returns true if the current cell has been set to read-only(see \helpref{wxGrid::SetReadOnly}{wxgridsetreadonly}).\membersection{wxGrid::IsEditable}\label{wxgridiseditable}\func{bool}{IsEditable}{\void}Returns false if the whole grid has been set as read-only or true otherwise.See \helpref{wxGrid::EnableEditing}{wxgridenableediting} for more information aboutcontrolling the editing status of grid cells.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -