]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/flexsizr.tex
optionally count repeating wxLog messages instead of logging all (patch 1520815)
[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
1c0c339c
JS
39\wxheading{See also}
40
41\helpref{wxSizer}{wxsizer}, \helpref{Sizer overview}{sizeroverview}
42
0e10e38d 43\latexignore{\rtfignore{\wxheading{Members}}}
5d76f462 44
f6bcfd97
BP
45\membersection{wxFlexGridSizer::wxFlexGridSizer}\label{wxflexgridsizerwxflexgridsizer}
46
47\func{}{wxFlexGridSizer}{\param{int }{rows}, \param{int }{cols}, \param{int }{vgap}, \param{int }{hgap}}
48
49\func{}{wxFlexGridSizer}{\param{int }{cols}, \param{int }{vgap = 0}, \param{int }{hgap = 0}}
50
51Constructor for a wxGridSizer. {\it rows} and {\it cols} determine the number of
52columns and rows in the sizer - if either of the parameters is zero, it will be
53calculated to form the total number of children in the sizer, thus making the
54sizer grow dynamically. {\it vgap} and {\it hgap} define extra space between
55all children.
56
f3cf3865
RD
57
58\membersection{wxFlexGridSizer::AddGrowableCol}\label{wxflexgridsizeraddgrowablecol}
59
e8800dcf 60\func{void}{AddGrowableCol}{\param{size\_t }{idx}, \param{int }{proportion = $0$}}
f3cf3865 61
e8800dcf 62Specifies that column {\it idx} (starting from zero) should be grown if
f3cf3865
RD
63there is extra space available to the sizer.
64
e8800dcf
VZ
65The {\it proportion} parameter has the same meaning as the stretch factor for
66the \helpref{sizers}{sizeroverview} except that if all proportions are $0$,
67then all columns are resized equally (instead of not being resized at all).
68
f3cf3865
RD
69\membersection{wxFlexGridSizer::AddGrowableRow}\label{wxflexgridsizeraddgrowablerow}
70
e8800dcf 71\func{void}{AddGrowableRow}{\param{size\_t }{idx}, \param{int }{proportion = $0$}}
f3cf3865
RD
72
73Specifies that row idx (starting from zero) should be grown if there
74is extra space available to the sizer.
75
e8800dcf
VZ
76See \helpref{AddGrowableCol}{wxflexgridsizeraddgrowablecol} for the description
77of {\it proportion} parameter.
78
5d76f462
VZ
79\membersection{wxFlexGridSizer::GetFlexibleDirection}\label{wxflexgridsizergetflexibledrection}
80
6cfc4ddb 81\constfunc{int}{GetFlexibleDirection}{\void}
5d76f462
VZ
82
83Returns a wxOrientation value that specifies whether the sizer flexibly
84resizes its columns, rows, or both (default).
85
86\wxheading{Return value}
87
88One of the following values:
89
90\begin{twocollist}
91\twocolitem{wxVERTICAL}{Rows are flexibly sized.}
92\twocolitem{wxHORIZONTAL}{Columns are flexibly sized.}
93\twocolitem{wxBOTH}{Both rows and columns are flexibly sized (this is the default value).}
94\end{twocollist}
95
96\wxheading{See also}
97
6cfc4ddb 98\helpref{SetFlexibleDirection}{wxflexgridsizersetflexibledirection}
5d76f462
VZ
99
100
101\membersection{wxFlexGridSizer::GetNonFlexibleGrowMode}\label{wxflexgridsizergetnonflexiblegrowmode}
102
103\constfunc{int}{GetNonFlexibleGrowMode}{\void}
104
154b6b0f 105Returns the value that specifies how the sizer grows in the "non-flexible"
5d76f462
VZ
106direction if there is one.
107
108\wxheading{Return value}
109
110One of the following values:
111
112\begin{twocollist}
154b6b0f 113\twocolitem{wxFLEX\_GROWMODE\_NONE}{Sizer doesn't grow in the non-flexible direction.}
5d76f462 114\twocolitem{wxFLEX\_GROWMODE\_SPECIFIED}{Sizer honors growable columns/rows set with
6cfc4ddb 115\helpref{AddGrowableCol}{wxflexgridsizeraddgrowablecol} and
5d76f462
VZ
116\helpref{AddGrowableRow}{wxflexgridsizeraddgrowablerow}.
117In this case equal sizing applies to minimum sizes of columns or
118rows (this is the default value).}
119\twocolitem{wxFLEX\_GROWMODE\_ALL}{Sizer equally stretches all columns or rows
154b6b0f 120in the non-flexible direction, whether they are growable or not in the flexible
5d76f462
VZ
121direction.}
122\end{twocollist}
123
124\wxheading{See also}
125
6cfc4ddb 126\helpref{SetFlexibleDirection}{wxflexgridsizersetflexibledirection},
5d76f462
VZ
127\helpref{SetNonFlexibleGrowMode}{wxflexgridsizersetnonflexiblegrowmode}
128
129
f3cf3865
RD
130\membersection{wxFlexGridSizer::RemoveGrowableCol}\label{wxflexgridsizerremovegrowablecol}
131
e7240349 132\func{void}{RemoveGrowableCol}{\param{size\_t }{idx}}
f3cf3865
RD
133
134Specifies that column idx is no longer growable.
135
5d76f462 136
f3cf3865
RD
137\membersection{wxFlexGridSizer::RemoveGrowableRow}\label{wxflexgridsizerremovegrowablerow}
138
e7240349 139\func{void}{RemoveGrowableRow}{\param{size\_t }{idx}}
f3cf3865
RD
140
141Specifies that row idx is no longer growable.
142
5d76f462 143
debc914b 144\membersection{wxFlexGridSizer::SetFlexibleDirection}\label{wxflexgridsizersetflexibledirection}
5d76f462 145
4033be78 146\func{void}{SetFlexibleDirection}{\param{int }{direction}}
5d76f462
VZ
147
148Specifies whether the sizer should flexibly resize its columns, rows, or
6cfc4ddb 149both. Argument {\tt direction} can be {\tt wxVERTICAL}, {\tt wxHORIZONTAL}
5d76f462
VZ
150or {\tt wxBOTH} (which is the default value). Any other value is ignored. See
151\helpref{GetFlexibleDirection()}{wxflexgridsizergetflexibledrection} for the
152explanation of these values.
153
154Note that this method does not trigger relayout.
155
156
debc914b 157\membersection{wxFlexGridSizer::SetNonFlexibleGrowMode}\label{wxflexgridsizersetnonflexiblegrowmode}
5d76f462 158
f6e9a818 159\func{void}{SetNonFlexibleGrowMode}{\param{wxFlexSizerGrowMode }{mode}}
5d76f462 160
154b6b0f 161Specifies how the sizer should grow in the non-flexible direction if
5d76f462 162there is one (so
4033be78 163\helpref{SetFlexibleDirection()}{wxflexgridsizersetflexibledirection} must have
5d76f462
VZ
164been called previously). Argument {\it mode} can be one of those documented in
165\helpref{GetNonFlexibleGrowMode}{wxflexgridsizergetnonflexiblegrowmode}, please
166see there for their explanation.
167
168Note that this method does not trigger relayout.