]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/flexsizr.tex
say that WarpPointer() is not supported under Mac
[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
5d76f462
VZ
9Since wxWindows 2.5.0, wxFlexGridSizer can also size items equally in one
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
1c0c339c
JS
24\wxheading{See also}
25
26\helpref{wxSizer}{wxsizer}, \helpref{Sizer overview}{sizeroverview}
27
5d76f462 28
f6bcfd97
BP
29\membersection{wxFlexGridSizer::wxFlexGridSizer}\label{wxflexgridsizerwxflexgridsizer}
30
31\func{}{wxFlexGridSizer}{\param{int }{rows}, \param{int }{cols}, \param{int }{vgap}, \param{int }{hgap}}
32
33\func{}{wxFlexGridSizer}{\param{int }{cols}, \param{int }{vgap = 0}, \param{int }{hgap = 0}}
34
35Constructor for a wxGridSizer. {\it rows} and {\it cols} determine the number of
36columns and rows in the sizer - if either of the parameters is zero, it will be
37calculated to form the total number of children in the sizer, thus making the
38sizer grow dynamically. {\it vgap} and {\it hgap} define extra space between
39all children.
40
f3cf3865
RD
41
42\membersection{wxFlexGridSizer::AddGrowableCol}\label{wxflexgridsizeraddgrowablecol}
43
e7240349 44\func{void}{AddGrowableCol}{\param{size\_t }{idx}}
f3cf3865
RD
45
46Specifies that column idx (starting from zero) should be grown if
47there is extra space available to the sizer.
48
49\membersection{wxFlexGridSizer::AddGrowableRow}\label{wxflexgridsizeraddgrowablerow}
50
e7240349 51\func{void}{AddGrowableRow}{\param{size\_t }{idx}}
f3cf3865
RD
52
53Specifies that row idx (starting from zero) should be grown if there
54is extra space available to the sizer.
55
5d76f462
VZ
56\membersection{wxFlexGridSizer::GetFlexibleDirection}\label{wxflexgridsizergetflexibledrection}
57
58\constfunc{int}{GetFlexibleDirections}{\void}
59
60Returns a wxOrientation value that specifies whether the sizer flexibly
61resizes its columns, rows, or both (default).
62
63\wxheading{Return value}
64
65One of the following values:
66
67\begin{twocollist}
68\twocolitem{wxVERTICAL}{Rows are flexibly sized.}
69\twocolitem{wxHORIZONTAL}{Columns are flexibly sized.}
70\twocolitem{wxBOTH}{Both rows and columns are flexibly sized (this is the default value).}
71\end{twocollist}
72
73\wxheading{See also}
74
debc914b 75\helpref{SetFlexibleDrection}{wxflexgridsizersetflexibledirection}
5d76f462
VZ
76
77
78\membersection{wxFlexGridSizer::GetNonFlexibleGrowMode}\label{wxflexgridsizergetnonflexiblegrowmode}
79
80\constfunc{int}{GetNonFlexibleGrowMode}{\void}
81
82Returns the value that specifies how the sizer grows in the "non flexible"
83direction if there is one.
84
85\wxheading{Return value}
86
87One of the following values:
88
89\begin{twocollist}
90\twocolitem{wxFLEX\_GROWMODE\_NONE}{Sizer doesn't grow in the non flexible direction.}
91\twocolitem{wxFLEX\_GROWMODE\_SPECIFIED}{Sizer honors growable columns/rows set with
92\helpref{AddGrowableCol}{wxflexgridsizeraddgrowablecol} and
93\helpref{AddGrowableRow}{wxflexgridsizeraddgrowablerow}.
94In this case equal sizing applies to minimum sizes of columns or
95rows (this is the default value).}
96\twocolitem{wxFLEX\_GROWMODE\_ALL}{Sizer equally stretches all columns or rows
97in the non flexible direction, whether they are growable or not in the flexbile
98direction.}
99\end{twocollist}
100
101\wxheading{See also}
102
debc914b 103\helpref{SetFlexibleDrection}{wxflexgridsizersetflexibledirection},
5d76f462
VZ
104\helpref{SetNonFlexibleGrowMode}{wxflexgridsizersetnonflexiblegrowmode}
105
106
f3cf3865
RD
107\membersection{wxFlexGridSizer::RemoveGrowableCol}\label{wxflexgridsizerremovegrowablecol}
108
e7240349 109\func{void}{RemoveGrowableCol}{\param{size\_t }{idx}}
f3cf3865
RD
110
111Specifies that column idx is no longer growable.
112
5d76f462 113
f3cf3865
RD
114\membersection{wxFlexGridSizer::RemoveGrowableRow}\label{wxflexgridsizerremovegrowablerow}
115
e7240349 116\func{void}{RemoveGrowableRow}{\param{size\_t }{idx}}
f3cf3865
RD
117
118Specifies that row idx is no longer growable.
119
5d76f462 120
debc914b 121\membersection{wxFlexGridSizer::SetFlexibleDirection}\label{wxflexgridsizersetflexibledirection}
5d76f462
VZ
122
123\func{void}{SetFlexibleDirections}{\param{int }{direction}}
124
125Specifies whether the sizer should flexibly resize its columns, rows, or
eaf498df 126both. Argument {\tt direction} can be {\tt wxVERTICAL}, {\tt wxHORIZONTAL}
5d76f462
VZ
127or {\tt wxBOTH} (which is the default value). Any other value is ignored. See
128\helpref{GetFlexibleDirection()}{wxflexgridsizergetflexibledrection} for the
129explanation of these values.
130
131Note that this method does not trigger relayout.
132
133
debc914b 134\membersection{wxFlexGridSizer::SetNonFlexibleGrowMode}\label{wxflexgridsizersetnonflexiblegrowmode}
5d76f462
VZ
135
136\func{void}{SetNonFlexibleGrowMode}{\param{int }{mode}}
137
138Specifies how the sizer should grow in the non flexible direction if
139there is one (so
debc914b 140\helpref{SetFlexibleDirections()}{wxflexgridsizersetflexibledirection} must have
5d76f462
VZ
141been called previously). Argument {\it mode} can be one of those documented in
142\helpref{GetNonFlexibleGrowMode}{wxflexgridsizergetnonflexiblegrowmode}, please
143see there for their explanation.
144
145Note that this method does not trigger relayout.
146