]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/flexsizr.tex
more LaTeX error fixes
[wxWidgets.git] / docs / latex / wx / flexsizr.tex
CommitLineData
6cfc4ddb
WS
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: flexsizr.tex
3%% Purpose: wxFlexGridSizer
4%% Author: wxWidgets Team
5%% Modified by:
6%% Created:
7%% RCS-ID: $Id$
8%% Copyright: (c) wxWidgets Team
9%% License: wxWindows license
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
f6bcfd97
BP
12\section{\class{wxFlexGridSizer}}\label{wxflexgridsizer}
13
14A flex grid sizer is a sizer which lays out its children in a two-dimensional
f3cf3865
RD
15table with all table fields in one row having the same
16height and all fields in one column having the same width, but all
17rows or all columns are not necessarily the same height or width as in
18the \helpref{wxGridSizer}{wxgridsizer}.
f6bcfd97 19
fc2171bd 20Since wxWidgets 2.5.0, wxFlexGridSizer can also size items equally in one
5d76f462 21direction but unequally ("flexibly") in the other. If the sizer is only
6cfc4ddb
WS
22flexible in one direction (this can be changed using
23\helpref{SetFlexibleDirection}{wxflexgridsizersetflexibledirection}),
154b6b0f 24it needs to be decided how the sizer should grow in the other ("non-flexible")
6cfc4ddb 25direction in order to fill the available space. The
5d76f462
VZ
26\helpref{SetNonFlexibleGrowMode}{wxflexgridsizersetnonflexiblegrowmode} method
27serves this purpose.
28
f6bcfd97
BP
29\wxheading{Derived from}
30
f3cf3865 31\helpref{wxGridSizer}{wxgridsizer}\\
f6bcfd97
BP
32\helpref{wxSizer}{wxsizer}\\
33\helpref{wxObject}{wxobject}
34
0bf97466
RN
35\wxheading{Include files}
36
37<wx/sizer.h>
38
a7af285d
VZ
39\wxheading{Library}
40
41\helpref{wxCore}{librarieslist}
42
1c0c339c
JS
43\wxheading{See also}
44
45\helpref{wxSizer}{wxsizer}, \helpref{Sizer overview}{sizeroverview}
46
0e10e38d 47\latexignore{\rtfignore{\wxheading{Members}}}
5d76f462 48
f6bcfd97
BP
49\membersection{wxFlexGridSizer::wxFlexGridSizer}\label{wxflexgridsizerwxflexgridsizer}
50
51\func{}{wxFlexGridSizer}{\param{int }{rows}, \param{int }{cols}, \param{int }{vgap}, \param{int }{hgap}}
52
53\func{}{wxFlexGridSizer}{\param{int }{cols}, \param{int }{vgap = 0}, \param{int }{hgap = 0}}
54
55Constructor for a wxGridSizer. {\it rows} and {\it cols} determine the number of
56columns and rows in the sizer - if either of the parameters is zero, it will be
57calculated to form the total number of children in the sizer, thus making the
58sizer grow dynamically. {\it vgap} and {\it hgap} define extra space between
59all children.
60
f3cf3865
RD
61
62\membersection{wxFlexGridSizer::AddGrowableCol}\label{wxflexgridsizeraddgrowablecol}
63
e8800dcf 64\func{void}{AddGrowableCol}{\param{size\_t }{idx}, \param{int }{proportion = $0$}}
f3cf3865 65
e8800dcf 66Specifies that column {\it idx} (starting from zero) should be grown if
f3cf3865
RD
67there is extra space available to the sizer.
68
e8800dcf
VZ
69The {\it proportion} parameter has the same meaning as the stretch factor for
70the \helpref{sizers}{sizeroverview} except that if all proportions are $0$,
71then all columns are resized equally (instead of not being resized at all).
72
f3cf3865
RD
73\membersection{wxFlexGridSizer::AddGrowableRow}\label{wxflexgridsizeraddgrowablerow}
74
e8800dcf 75\func{void}{AddGrowableRow}{\param{size\_t }{idx}, \param{int }{proportion = $0$}}
f3cf3865
RD
76
77Specifies that row idx (starting from zero) should be grown if there
78is extra space available to the sizer.
79
e8800dcf
VZ
80See \helpref{AddGrowableCol}{wxflexgridsizeraddgrowablecol} for the description
81of {\it proportion} parameter.
82
5d76f462
VZ
83\membersection{wxFlexGridSizer::GetFlexibleDirection}\label{wxflexgridsizergetflexibledrection}
84
6cfc4ddb 85\constfunc{int}{GetFlexibleDirection}{\void}
5d76f462
VZ
86
87Returns a wxOrientation value that specifies whether the sizer flexibly
88resizes its columns, rows, or both (default).
89
90\wxheading{Return value}
91
92One of the following values:
93
94\begin{twocollist}
95\twocolitem{wxVERTICAL}{Rows are flexibly sized.}
96\twocolitem{wxHORIZONTAL}{Columns are flexibly sized.}
97\twocolitem{wxBOTH}{Both rows and columns are flexibly sized (this is the default value).}
98\end{twocollist}
99
100\wxheading{See also}
101
6cfc4ddb 102\helpref{SetFlexibleDirection}{wxflexgridsizersetflexibledirection}
5d76f462
VZ
103
104
105\membersection{wxFlexGridSizer::GetNonFlexibleGrowMode}\label{wxflexgridsizergetnonflexiblegrowmode}
106
107\constfunc{int}{GetNonFlexibleGrowMode}{\void}
108
154b6b0f 109Returns the value that specifies how the sizer grows in the "non-flexible"
5d76f462
VZ
110direction if there is one.
111
112\wxheading{Return value}
113
114One of the following values:
115
116\begin{twocollist}
154b6b0f 117\twocolitem{wxFLEX\_GROWMODE\_NONE}{Sizer doesn't grow in the non-flexible direction.}
5d76f462 118\twocolitem{wxFLEX\_GROWMODE\_SPECIFIED}{Sizer honors growable columns/rows set with
6cfc4ddb 119\helpref{AddGrowableCol}{wxflexgridsizeraddgrowablecol} and
5d76f462
VZ
120\helpref{AddGrowableRow}{wxflexgridsizeraddgrowablerow}.
121In this case equal sizing applies to minimum sizes of columns or
122rows (this is the default value).}
123\twocolitem{wxFLEX\_GROWMODE\_ALL}{Sizer equally stretches all columns or rows
154b6b0f 124in the non-flexible direction, whether they are growable or not in the flexible
5d76f462
VZ
125direction.}
126\end{twocollist}
127
128\wxheading{See also}
129
6cfc4ddb 130\helpref{SetFlexibleDirection}{wxflexgridsizersetflexibledirection},
5d76f462
VZ
131\helpref{SetNonFlexibleGrowMode}{wxflexgridsizersetnonflexiblegrowmode}
132
133
f3cf3865
RD
134\membersection{wxFlexGridSizer::RemoveGrowableCol}\label{wxflexgridsizerremovegrowablecol}
135
e7240349 136\func{void}{RemoveGrowableCol}{\param{size\_t }{idx}}
f3cf3865
RD
137
138Specifies that column idx is no longer growable.
139
5d76f462 140
f3cf3865
RD
141\membersection{wxFlexGridSizer::RemoveGrowableRow}\label{wxflexgridsizerremovegrowablerow}
142
e7240349 143\func{void}{RemoveGrowableRow}{\param{size\_t }{idx}}
f3cf3865
RD
144
145Specifies that row idx is no longer growable.
146
5d76f462 147
debc914b 148\membersection{wxFlexGridSizer::SetFlexibleDirection}\label{wxflexgridsizersetflexibledirection}
5d76f462 149
4033be78 150\func{void}{SetFlexibleDirection}{\param{int }{direction}}
5d76f462
VZ
151
152Specifies whether the sizer should flexibly resize its columns, rows, or
6cfc4ddb 153both. Argument {\tt direction} can be {\tt wxVERTICAL}, {\tt wxHORIZONTAL}
5d76f462
VZ
154or {\tt wxBOTH} (which is the default value). Any other value is ignored. See
155\helpref{GetFlexibleDirection()}{wxflexgridsizergetflexibledrection} for the
156explanation of these values.
157
158Note that this method does not trigger relayout.
159
160
debc914b 161\membersection{wxFlexGridSizer::SetNonFlexibleGrowMode}\label{wxflexgridsizersetnonflexiblegrowmode}
5d76f462 162
f6e9a818 163\func{void}{SetNonFlexibleGrowMode}{\param{wxFlexSizerGrowMode }{mode}}
5d76f462 164
154b6b0f 165Specifies how the sizer should grow in the non-flexible direction if
5d76f462 166there is one (so
4033be78 167\helpref{SetFlexibleDirection()}{wxflexgridsizersetflexibledirection} must have
5d76f462
VZ
168been called previously). Argument {\it mode} can be one of those documented in
169\helpref{GetNonFlexibleGrowMode}{wxflexgridsizergetnonflexiblegrowmode}, please
170see there for their explanation.
171
172Note that this method does not trigger relayout.
b67a86d5 173