]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/flexsizr.tex
say that WarpPointer() is not supported under Mac
[wxWidgets.git] / docs / latex / wx / flexsizr.tex
... / ...
CommitLineData
1\section{\class{wxFlexGridSizer}}\label{wxflexgridsizer}
2
3A flex grid sizer is a sizer which lays out its children in a two-dimensional
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}.
8
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
12\helpref{SetFlexibleDrection}{wxflexgridsizersetflexibledirection}),
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
18\wxheading{Derived from}
19
20\helpref{wxGridSizer}{wxgridsizer}\\
21\helpref{wxSizer}{wxsizer}\\
22\helpref{wxObject}{wxobject}
23
24\wxheading{See also}
25
26\helpref{wxSizer}{wxsizer}, \helpref{Sizer overview}{sizeroverview}
27
28
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
41
42\membersection{wxFlexGridSizer::AddGrowableCol}\label{wxflexgridsizeraddgrowablecol}
43
44\func{void}{AddGrowableCol}{\param{size\_t }{idx}}
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
51\func{void}{AddGrowableRow}{\param{size\_t }{idx}}
52
53Specifies that row idx (starting from zero) should be grown if there
54is extra space available to the sizer.
55
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
75\helpref{SetFlexibleDrection}{wxflexgridsizersetflexibledirection}
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
103\helpref{SetFlexibleDrection}{wxflexgridsizersetflexibledirection},
104\helpref{SetNonFlexibleGrowMode}{wxflexgridsizersetnonflexiblegrowmode}
105
106
107\membersection{wxFlexGridSizer::RemoveGrowableCol}\label{wxflexgridsizerremovegrowablecol}
108
109\func{void}{RemoveGrowableCol}{\param{size\_t }{idx}}
110
111Specifies that column idx is no longer growable.
112
113
114\membersection{wxFlexGridSizer::RemoveGrowableRow}\label{wxflexgridsizerremovegrowablerow}
115
116\func{void}{RemoveGrowableRow}{\param{size\_t }{idx}}
117
118Specifies that row idx is no longer growable.
119
120
121\membersection{wxFlexGridSizer::SetFlexibleDirection}\label{wxflexgridsizersetflexibledirection}
122
123\func{void}{SetFlexibleDirections}{\param{int }{direction}}
124
125Specifies whether the sizer should flexibly resize its columns, rows, or
126both. Argument {\tt direction} can be {\tt wxVERTICAL}, {\tt wxHORIZONTAL}
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
134\membersection{wxFlexGridSizer::SetNonFlexibleGrowMode}\label{wxflexgridsizersetnonflexiblegrowmode}
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
140\helpref{SetFlexibleDirections()}{wxflexgridsizersetflexibledirection} must have
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