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