wxflexgridsizera 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 setflexibledirection), 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. derived from include files <wx/sizer.h> see also members
wxflexgridsizer::wxflexgridsizer
wxflexgridsizer::wxflexgridsizerwxflexgridsizer(int rows, int cols, int vgap, int hgap) wxflexgridsizer(int cols, int vgap = 0, int hgap = 0) 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.
wxflexgridsizer::addgrowablecolvoid addgrowablecol(size_t idx, int proportion = 0) 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 0, then all columns are resized equally (instead of not being resized at all).
wxflexgridsizer::addgrowablerowvoid addgrowablerow(size_t idx, int proportion = 0) 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.
wxflexgridsizer::getflexibledirectionint getflexibledirection() const returns a wxorientation value that specifies whether the sizer flexibly resizes its columns, rows, or both (default). return value one of the following values:
see also
wxflexgridsizer::getnonflexiblegrowmodeint getnonflexiblegrowmode() const returns the value that specifies how the sizer grows in the "non-flexible" direction if there is one. return value one of the following values:
see also setflexibledirection, setnonflexiblegrowmode
wxflexgridsizer::removegrowablecolvoid removegrowablecol(size_t idx) specifies that column idx is no longer growable.
wxflexgridsizer::removegrowablerowvoid removegrowablerow(size_t idx) specifies that row idx is no longer growable.
wxflexgridsizer::setflexibledirectionvoid setflexibledirection(int direction) 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.
wxflexgridsizer::setnonflexiblegrowmodevoid setnonflexiblegrowmode(wxflexsizergrowmode mode) specifies how the sizer should grow in the non-flexible direction if there is one (so setflexibledirection() 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.
|