⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 grid.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
📖 第 1 页 / 共 5 页
字号:
\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 gridbecause it will not resize a column that is already narrower than the minimal width.The width argument must be higher than the minimimal acceptable column width, see\helpref{wxGrid::GetColMinimalAcceptableWidth}{wxgridgetcolminimalacceptablewidth}.\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 hereallows smaller grid cells to be dealt with correctly. Specifying a value here which is much smallerthan the actual minimum size will incur a performance penalty in the functions which performgrid cell index lookup on the basis of screen coordinates.This should normally be called when creating the grid because it will not resize existing columnswith sizes smaller than the value specified here.\membersection{wxGrid::SetColPos}\label{wxgridsetcolpos}\func{void}{SetColPos}{\param{int }{colID}, \param{int }{newPos}}Sets the position of the specified column.\membersection{wxGrid::SetColSize}\label{wxgridsetcolsize}\func{void}{SetColSize}{\param{int }{col}, \param{int }{width}}Sets the width of the specified column.This function does not refresh the grid. If you are calling it outside of a BeginBatch / EndBatchblock you can use \helpref{wxGrid::ForceRefresh}{wxgridforcerefresh} to see the changes.Automatically sizes the column to fit its contents. If setAsMin is true the calculated width willalso be set as the minimal width for the column.\wxheading{Note}\\wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.The memory requirements for this could become prohibitive if your grid is very large.\membersection{wxGrid::SetDefaultCellAlignment}\label{wxgridsetdefaultcellalignment}\func{void}{SetDefaultCellAlignment}{\param{int }{horiz}, \param{int }{vert}}Sets the default horizontal and vertical alignment for grid cell text.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.\membersection{wxGrid::SetDefaultCellBackgroundColour}\label{wxgridsetdefaultcellbackgroundcolour}\func{void}{SetDefaultCellBackgroundColour}{\param{const wxColour\&}{ colour}}Sets the default background colour for grid cells.\membersection{wxGrid::SetDefaultCellFont}\label{wxgridsetdefaultcellfont}\func{void}{SetDefaultCellFont}{\param{const wxFont\&}{ font}}Sets the default font to be used for grid cell text.\membersection{wxGrid::SetDefaultCellTextColour}\label{wxgridsetdefaultcelltextcolour}\func{void}{SetDefaultCellTextColour}{\param{const wxColour\&}{ colour}}Sets the current default colour for grid cell text.\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} andthe \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.\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} andthe \helpref{wxGrid overview}{gridoverview} for more information about cell editors and renderers.\membersection{wxGrid::SetDefaultColSize}\label{wxgridsetdefaultcolsize}\func{void}{SetDefaultColSize}{\param{int }{width}, \param{bool }{resizeExistingCols = false}}Sets the default width for columns in the grid. This will only affect columns subsequently added tothe grid unless resizeExistingCols is true.\membersection{wxGrid::SetDefaultRowSize}\label{wxgridsetdefaultrowsize}\func{void}{SetDefaultRowSize}{\param{int }{height}, \param{bool }{resizeExistingRows = false}}Sets the default height for rows in the grid. This will only affect rows subsequently addedto the grid unless resizeExistingRows is true.\membersection{wxGrid::SetGridCursor}\label{wxgridsetgridcursor}\func{void}{SetGridCursor}{\param{int }{row}, \param{int }{col}}Set the grid cursor to the specified cell.This function calls \helpref{wxGrid::MakeCellVisible}{wxgridmakecellvisible}.\membersection{wxGrid::SetGridLineColour}\label{wxgridsetgridlinecolour}\func{void}{SetGridLineColour}{\param{const wxColour\&}{colour}}Sets the colour used to draw grid lines.\membersection{wxGrid::SetLabelBackgroundColour}\label{wxgridsetlabelbackgroundcolour}\func{void}{SetLabelBackgroundColour}{\param{const wxColour\&}{ colour}}Sets the background colour for row and column labels.\membersection{wxGrid::SetLabelFont}\label{wxgridsetlabelfont}\func{void}{SetLabelFont}{\param{const wxFont\&}{ font}}Sets the font for row and column labels.\membersection{wxGrid::SetLabelTextColour}\label{wxgridsetlabeltextcolour}\func{void}{SetLabelTextColour}{\param{const wxColour\&}{ colour}}Sets the colour for row and column label text.\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. Thisfunction allows to set how big this extra space is\membersection{wxGrid::SetOrCalcColumnSizes}\label{wxgridsetorcalccolumnsizes}\func{int}{SetOrCalcColumnSizes}{\param{bool }{calcOnly}, \param{bool }{setAsMin = true}}Common part of AutoSizeColumn/Row() and GetBestSize()\membersection{wxGrid::SetOrCalcRowSizes}\label{wxgridsetorcalcrowsizes}\func{int}{SetOrCalcRowSizes}{\param{bool }{calcOnly}, \param{bool }{setAsMin = true}}\membersection{wxGrid::SetReadOnly}\label{wxgridsetreadonly}\func{void}{SetReadOnly}{\param{int }{row}, \param{int }{col}, \param{bool }{isReadOnly = true}}Makes the cell at the specified location read-only or editable.See also \helpref{wxGrid::IsReadOnly}{wxgridisreadonly}.\membersection{wxGrid::SetRowAttr}\label{wxgridsetrowattr}\func{void}{SetRowAttr}{\param{int }{row}, \param{wxGridCellAttr* }{attr}}Sets the cell attributes for all cells in the specified row.See the \helpref{wxGridCellAttr}{wxgridcellattr} class for more informationabout controlling cell attributes.\membersection{wxGrid::SetRowLabelAlignment}\label{wxgridsetrowlabelalignment}\func{void}{SetRowLabelAlignment}{\param{int }{horiz}, \param{int }{vert}}Sets the horizontal and vertical alignment of row label text.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.\membersection{wxGrid::SetRowLabelSize}\label{wxgridsetrowlabelsize}\func{void}{SetRowLabelSize}{\param{int }{width}}Sets the width of the row labels.\membersection{wxGrid::SetRowLabelValue}\label{wxgridsetrowlabelvalue}\func{void}{SetRowLabelValue}{\param{int }{row}, \param{const wxString\&}{ value}}Set the value for the given row label. If you are using a derived grid table you mustoverride \helpref{wxGridTableBase::SetRowLabelValue}{wxgridtablebasesetrowlabelvalue}for this to have any effect.\membersection{wxGrid::SetRowMinimalHeight}\label{wxgridsetrowminimalheight}\func{void}{SetRowMinimalHeight}{\param{int }{row}, \param{int }{height}}Sets the minimal height for the specified row. This should normally be called when creating the gridbecause it will not resize a row that is already shorter than the minimal height.The height argument must be higher than the minimimal acceptable row height, see\helpref{wxGrid::GetRowMinimalAcceptableHeight}{wxgridgetrowminimalacceptableheight}.\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 hereallows smaller grid cells to be dealt with correctly. Specifying a value here which is much smallerthan the actual minimum size will incur a performance penalty in the functions which performgrid cell index lookup on the basis of screen coordinates.This should normally be called when creating the grid because it will not resize existing rowswith sizes smaller than the value specified here.\membersection{wxGrid::SetRowSize}\label{wxgridsetrowsize}\func{void}{SetRowSize}{\param{int }{row}, \param{int }{height}}Sets the height of the specified row.This function does not refresh the grid. If you are calling it outside of a BeginBatch / EndBatchblock you can use \helpref{wxGrid::ForceRefresh}{wxgridforcerefresh} to see the changes.Automatically sizes the column to fit its contents. If setAsMin is true the calculated width willalso be set as the minimal width for the column.\wxheading{Note}wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used.The memory requirements for this could become prohibitive if your grid is very large.\membersection{wxGrid::SetScrollLineX}\label{wxgridsetscrolllinex}\func{void}{SetScrollLineX}{\param{int }{x}}Sets the number of pixels per horizontal scroll increment. The default is 15.Sometimes wxGrid has trouble setting the scrollbars correctly due to roundingerrors: setting this to 1 can help.\wxheading{See also}\helpref{wxGrid::GetScrollLineX}{wxgridgetscrolllinex},\rtfsp\helpref{wxGrid::GetScrollLineY}{wxgridgetscrollliney},\rtfsp\helpref{wxGrid::SetScrollLineY}{wxgridsetscrollliney}\membersection{wxGrid::SetScrollLineY}\label{wxgridsetscrollliney}\func{void}{SetScrollLineY}{\param{int }{y}}Sets the number of pixels per vertical scroll increment. The default is 15.Sometimes wxGrid has trouble setting the scrollbars correctly due to roundingerrors: setting this to 1 can help.\wxheading{See also}\helpref{wxGrid::GetScrollLineX}{wxgridgetscrolllinex},\rtfsp\helpref{wxGrid::GetScrollLineY}{wxgridgetscrollliney},\rtfsp\helpref{wxGrid::SetScrollLineX}{wxgridsetscrolllinex}\membersection{wxGrid::SetSelectionBackground}\label{wxgridsetselectionbackground}\func{void}{SetSelectionBackground}{\param{const wxColour\& }{c}}\membersection{wxGrid::SetSelectionForeground}\label{wxgridsetselectionforeground}\func{void}{SetSelectionForeground}{\param{const wxColour\& }{c}}\membersection{wxGrid::SetSelectionMode}\label{wxgridsetselectionmode}\func{void}{SetSelectionMode}{\param{wxGrid::wxGridSelectionModes}{ selmode}}Set the selection behaviour of the grid.\wxheading{Parameters}\docparam{wxGrid::wxGridSelectCells}{The default mode where individual cells are selected.}\docparam{wxGrid::wxGridSelectRows}{Selections will consist of whole rows.}\docparam{wxGrid::wxGridSelectColumns}{Selections will consist of whole columns.}\membersection{wxGrid::SetTable}\label{wxgridsettable}\func{bool}{SetTable}{\param{wxGridTableBase* }{table}, \param{bool }{takeOwnership = false}, \param{wxGrid::wxGridSelectionModes }{selmode = wxGrid::wxGridSelectCells}}Passes a pointer to a custom grid table to be used by the grid. This should be calledafter the grid constructor and before using the grid object. If takeOwnership is set totrue then the table will be deleted by the wxGrid destructor.Use this function instead of \helpref{wxGrid::CreateGrid}{wxgridcreategrid} when yourapplication involves complex or non-string data or data sets that are too large to fitwholly in memory.\membersection{wxGrid::ShowCellEditControl}\label{wxgridshowcelleditcontrol}\func{void}{ShowCellEditControl}{\void}Displays the in-place cell edit control for the current cell.\membersection{wxGrid::XToCol}\label{wxgridxtocol}\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.}\wxheading{Return value}The grid column that corresponds to the logical x coordinate. Returns{\tt wxNOT\_FOUND} if there is no column at the x position.\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.If no column edge is near to this position {\tt wxNOT\_FOUND} is returned.\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.If no row edge is near to this position {\tt wxNOT\_FOUND} is returned.\membersection{wxGrid::YToRow}\label{wxgridytorow}\func{int}{YToRow}{\param{int }{y}}Returns the grid row that corresponds to the logical y coordinate. Returns{\tt wxNOT\_FOUND} if there is no row at the y position.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -