📄 flexsizr.tex
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Name: flexsizr.tex%% Purpose: wxFlexGridSizer%% Author: wxWidgets Team%% Modified by:%% Created:%% RCS-ID: $Id: flexsizr.tex,v 1.18 2006/10/10 17:46:47 JS Exp $%% Copyright: (c) wxWidgets Team%% License: wxWindows license%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\section{\class{wxFlexGridSizer}}\label{wxflexgridsizer}A flex grid sizer is a sizer which lays out its children in a two-dimensionaltable with all table fields in one row having the sameheight and all fields in one column having the same width, but allrows or all columns are not necessarily the same height or width as inthe \helpref{wxGridSizer}{wxgridsizer}.Since wxWidgets 2.5.0, wxFlexGridSizer can also size items equally in onedirection but unequally ("flexibly") in the other. If the sizer is onlyflexible in one direction (this can be changed using\helpref{SetFlexibleDirection}{wxflexgridsizersetflexibledirection}),it needs to be decided how the sizer should grow in the other ("non-flexible")direction in order to fill the available space. The\helpref{SetNonFlexibleGrowMode}{wxflexgridsizersetnonflexiblegrowmode} methodserves this purpose.\wxheading{Derived from}\helpref{wxGridSizer}{wxgridsizer}\\\helpref{wxSizer}{wxsizer}\\\helpref{wxObject}{wxobject}\wxheading{Include files}<wx/sizer.h>\wxheading{See also}\helpref{wxSizer}{wxsizer}, \helpref{Sizer overview}{sizeroverview}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxFlexGridSizer::wxFlexGridSizer}\label{wxflexgridsizerwxflexgridsizer}\func{}{wxFlexGridSizer}{\param{int }{rows}, \param{int }{cols}, \param{int }{vgap}, \param{int }{hgap}}\func{}{wxFlexGridSizer}{\param{int }{cols}, \param{int }{vgap = 0}, \param{int }{hgap = 0}}Constructor for a wxGridSizer. {\it rows} and {\it cols} determine the number ofcolumns and rows in the sizer - if either of the parameters is zero, it will becalculated to form the total number of children in the sizer, thus making thesizer grow dynamically. {\it vgap} and {\it hgap} define extra space betweenall children.\membersection{wxFlexGridSizer::AddGrowableCol}\label{wxflexgridsizeraddgrowablecol}\func{void}{AddGrowableCol}{\param{size\_t }{idx}, \param{int }{proportion = $0$}}Specifies that column {\it idx} (starting from zero) should be grown ifthere is extra space available to the sizer.The {\it proportion} parameter has the same meaning as the stretch factor forthe \helpref{sizers}{sizeroverview} except that if all proportions are $0$,then all columns are resized equally (instead of not being resized at all).\membersection{wxFlexGridSizer::AddGrowableRow}\label{wxflexgridsizeraddgrowablerow}\func{void}{AddGrowableRow}{\param{size\_t }{idx}, \param{int }{proportion = $0$}}Specifies that row idx (starting from zero) should be grown if thereis extra space available to the sizer.See \helpref{AddGrowableCol}{wxflexgridsizeraddgrowablecol} for the descriptionof {\it proportion} parameter.\membersection{wxFlexGridSizer::GetFlexibleDirection}\label{wxflexgridsizergetflexibledrection}\constfunc{int}{GetFlexibleDirection}{\void}Returns a wxOrientation value that specifies whether the sizer flexiblyresizes its columns, rows, or both (default).\wxheading{Return value}One of the following values:\begin{twocollist}\twocolitem{wxVERTICAL}{Rows are flexibly sized.}\twocolitem{wxHORIZONTAL}{Columns are flexibly sized.}\twocolitem{wxBOTH}{Both rows and columns are flexibly sized (this is the default value).}\end{twocollist}\wxheading{See also}\helpref{SetFlexibleDirection}{wxflexgridsizersetflexibledirection}\membersection{wxFlexGridSizer::GetNonFlexibleGrowMode}\label{wxflexgridsizergetnonflexiblegrowmode}\constfunc{int}{GetNonFlexibleGrowMode}{\void}Returns the value that specifies how the sizer grows in the "non-flexible"direction if there is one.\wxheading{Return value}One of the following values:\begin{twocollist}\twocolitem{wxFLEX\_GROWMODE\_NONE}{Sizer doesn't grow in the non-flexible direction.}\twocolitem{wxFLEX\_GROWMODE\_SPECIFIED}{Sizer honors growable columns/rows set with\helpref{AddGrowableCol}{wxflexgridsizeraddgrowablecol} and\helpref{AddGrowableRow}{wxflexgridsizeraddgrowablerow}.In this case equal sizing applies to minimum sizes of columns orrows (this is the default value).}\twocolitem{wxFLEX\_GROWMODE\_ALL}{Sizer equally stretches all columns or rowsin the non-flexible direction, whether they are growable or not in the flexibledirection.}\end{twocollist}\wxheading{See also}\helpref{SetFlexibleDirection}{wxflexgridsizersetflexibledirection},\helpref{SetNonFlexibleGrowMode}{wxflexgridsizersetnonflexiblegrowmode}\membersection{wxFlexGridSizer::RemoveGrowableCol}\label{wxflexgridsizerremovegrowablecol}\func{void}{RemoveGrowableCol}{\param{size\_t }{idx}}Specifies that column idx is no longer growable.\membersection{wxFlexGridSizer::RemoveGrowableRow}\label{wxflexgridsizerremovegrowablerow}\func{void}{RemoveGrowableRow}{\param{size\_t }{idx}}Specifies that row idx is no longer growable.\membersection{wxFlexGridSizer::SetFlexibleDirection}\label{wxflexgridsizersetflexibledirection}\func{void}{SetFlexibleDirection}{\param{int }{direction}}Specifies whether the sizer should flexibly resize its columns, rows, orboth. Argument {\tt direction} can be {\tt wxVERTICAL}, {\tt wxHORIZONTAL}or {\tt wxBOTH} (which is the default value). Any other value is ignored. See\helpref{GetFlexibleDirection()}{wxflexgridsizergetflexibledrection} for theexplanation of these values.Note that this method does not trigger relayout.\membersection{wxFlexGridSizer::SetNonFlexibleGrowMode}\label{wxflexgridsizersetnonflexiblegrowmode}\func{void}{SetNonFlexibleGrowMode}{\param{wxFlexSizerGrowMode }{mode}}Specifies how the sizer should grow in the non-flexible direction ifthere is one (so\helpref{SetFlexibleDirection()}{wxflexgridsizersetflexibledirection} must havebeen called previously). Argument {\it mode} can be one of those documented in\helpref{GetNonFlexibleGrowMode}{wxflexgridsizergetnonflexiblegrowmode}, pleasesee there for their explanation.Note that this method does not trigger relayout.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -