A flex grid sizer is a sizer which lays out its children in a two-dimensional table with all table fields in one row having the same height and all fields in one column having the same width, but all rows or all columns are not necessarily the same height or width as in the wxGridSizer.
Since wxWidgets 2.5.0, wxFlexGridSizer can also size items equally in one direction but unequally ("flexibly") in the other. If the sizer is only flexible in one direction (this can be changed using SetFlexibleDrection), it needs to be decided how the sizer should grow in the other ("non flexible") direction in order to fill the available space. The SetNonFlexibleGrowMode method serves this purpose.
wxSizer, Sizer overview
Constructor for a wxGridSizer. rows and cols determine the number of columns and rows in the sizer - if either of the parameters is zero, it will be calculated to form the total number of children in the sizer, thus making the sizer grow dynamically. vgap and hgap define extra space between all children.
Specifies that column idx (starting from zero) should be grown if there is extra space available to the sizer.
The proportion parameter has the same meaning as the stretch factor for the sizers except that if all proportions are , then all columns are resized equally (instead of not being resized at all).
Specifies that row idx (starting from zero) should be grown if there is extra space available to the sizer.
See AddGrowableCol for the description of proportion parameter.
int GetFlexibleDirections(void) const
Returns a wxOrientation value that specifies whether the sizer flexibly resizes its columns, rows, or both (default).
One of the following values:
|wxVERTICAL||Rows are flexibly sized.|
|wxHORIZONTAL||Columns are flexibly sized.|
|wxBOTH||Both rows and columns are flexibly sized (this is the default value).|
int GetNonFlexibleGrowMode(void) const
Returns the value that specifies how the sizer grows in the "non flexible" direction if there is one.
One of the following values:
|wxFLEX_GROWMODE_NONE||Sizer doesn't grow in the non flexible direction.|
|wxFLEX_GROWMODE_SPECIFIED||Sizer honors growable columns/rows set with AddGrowableCol and AddGrowableRow. In this case equal sizing applies to minimum sizes of columns or rows (this is the default value).|
|wxFLEX_GROWMODE_ALL||Sizer equally stretches all columns or rows in the non flexible direction, whether they are growable or not in the flexible direction.|
Specifies that column idx is no longer growable.
Specifies that row idx is no longer growable.
Specifies whether the sizer should flexibly resize its columns, rows, or both. Argument direction can be wxVERTICAL, wxHORIZONTAL or wxBOTH (which is the default value). Any other value is ignored. See GetFlexibleDirection() for the explanation of these values.
Note that this method does not trigger relayout.
Specifies how the sizer should grow in the non flexible direction if there is one (so SetFlexibleDirections() must have been called previously). Argument mode can be one of those documented in GetNonFlexibleGrowMode, please see there for their explanation.
Note that this method does not trigger relayout.ymasuda 平成17年11月19日