Go to main content

man pages section 3: Extended Library Functions, Volume 1

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

wxFlexGridSizer (3erl)

Name

wxFlexGridSizer - Functions for wxFlexGridSizer class

Synopsis

Please see following description for synopsis

Description

wxFlexGridSizer(3)         Erlang Module Definition         wxFlexGridSizer(3)



NAME
       wxFlexGridSizer - Functions for wxFlexGridSizer class

DESCRIPTION
       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 setFlexi-
       bleDirection/2), 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/2 method serves this purpose.

       See: wxSizer, Overview sizer

       This class is derived (and can use functions) from: wxGridSizer wxSizer

       wxWidgets docs: wxFlexGridSizer

DATA TYPES
       wxFlexGridSizer() = wx:wx_object()

EXPORTS
       new(Cols) -> wxFlexGridSizer()

              Types:

                 Cols = integer()

       new(Cols, Options :: [Option]) -> wxFlexGridSizer()

              Types:

                 Cols = integer()
                 Option = {gap, {W :: integer(), H :: integer()}}

       new(Cols, Vgap, Hgap) -> wxFlexGridSizer()

       new(Rows, Cols, Gap) -> wxFlexGridSizer()

              Types:

                 Rows = Cols = integer()
                 Gap = {W :: integer(), H :: integer()}

       new(Rows, Cols, Vgap, Hgap) -> wxFlexGridSizer()

              Types:

                 Rows = Cols = Vgap = Hgap = integer()

       addGrowableCol(This, Idx) -> ok

              Types:

                 This = wxFlexGridSizer()
                 Idx = integer()

       addGrowableCol(This, Idx, Options :: [Option]) -> ok

              Types:

                 This = wxFlexGridSizer()
                 Idx = integer()
                 Option = {proportion, integer()}

              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 (see wxBoxSizer) except that if  all  pro-
              portions are 0, then all columns are resized equally (instead of
              not being resized at all).

              Notice that the column must not be already growable, if you need
              to change the proportion you must call removeGrowableCol/2 first
              and then make it growable (with a different  proportion)  again.
              You  can  use  IsColGrowable()  (not implemented in wx) to check
              whether a column is already growable.

       addGrowableRow(This, Idx) -> ok

              Types:

                 This = wxFlexGridSizer()
                 Idx = integer()

       addGrowableRow(This, Idx, Options :: [Option]) -> ok

              Types:

                 This = wxFlexGridSizer()
                 Idx = integer()
                 Option = {proportion, integer()}

              Specifies that row idx (starting from zero) should be  grown  if
              there is extra space available to the sizer.

              This  is identical to addGrowableCol/3 except that it works with
              rows and not columns.

       getFlexibleDirection(This) -> integer()

              Types:

                 This = wxFlexGridSizer()

              Returns a ?wxOrientation value that specifies whether the  sizer
              flexibly resizes its columns, rows, or both (default).

              Return: One of the following values:

              See: setFlexibleDirection/2

       getNonFlexibleGrowMode(This) -> wx:wx_enum()

              Types:

                 This = wxFlexGridSizer()

              Returns  the  value  that  specifies  how the sizer grows in the
              "non-flexible" direction if there is one.

              The behaviour of the elements in the  flexible  direction  (i.e.
              both rows and columns by default, or rows only if getFlexibleDi-
              rection/1 is wxVERTICAL or columns only if it  is  wxHORIZONTAL)
              is  always governed by their proportion as specified in the call
              to addGrowableRow/3 or addGrowableCol/3.  What  happens  in  the
              other  direction  depends on the value of returned by this func-
              tion as described below.

              Return: One of the following values:

              See: setFlexibleDirection/2, setNonFlexibleGrowMode/2

       removeGrowableCol(This, Idx) -> ok

              Types:

                 This = wxFlexGridSizer()
                 Idx = integer()

              Specifies that the idx column index is no longer growable.

       removeGrowableRow(This, Idx) -> ok

              Types:

                 This = wxFlexGridSizer()
                 Idx = integer()

              Specifies that the idx row index is no longer growable.

       setFlexibleDirection(This, Direction) -> ok

              Types:

                 This = wxFlexGridSizer()
                 Direction = integer()

              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/1 for the explanation of these  values.
              Note that this method does not trigger relayout.

       setNonFlexibleGrowMode(This, Mode) -> ok

              Types:

                 This = wxFlexGridSizer()
                 Mode = wx:wx_enum()

              Specifies  how  the sizer should grow in the non-flexible direc-
              tion if there is one (so setFlexibleDirection/2 must  have  been
              called previously).

              Argument  mode can be one of those documented in getNonFlexible-
              GrowMode/1, please see there for their  explanation.  Note  that
              this method does not trigger relayout.

       destroy(This :: wxFlexGridSizer()) -> ok

              Destroys the object.



wxWidgets team.                    wx 2.1.1                 wxFlexGridSizer(3)