wxGridSizer(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’– wxGridSizer πŸ’– (that's the Erlang module definition, bestie)

okay so real quick before we dive in: this whole page lives in the Erlang world, it's wxGridSizer(3), and it's giving very organized group-chat energy. Let's gooo πŸ¦‹


✨ NAME ✨

wxGridSizer β€” a grid sizer is a sizer which lays out its children in a two-dimensional table with all table fields having the same size, i.e. the width of each field is the width of the widest child, the height of each field is the height of the tallest child. πŸ’…


🌸 DESCRIPTION 🌸

no cap, that's the whole vibe: everything gets its own lil cell in a two-dimensional table, and every cell is the same size. so πŸ‘ the width of each field is the width of the widest child, and the height of each field is the height of the tallest child. one giant kid in the family and everybody's cell stretches to match. iconic behavior, honestly. πŸ‘‘

See:

  • wxSizer
  • Overview sizer

also important: this class is derived, and can use functions, from:

  • wxSizer

and if you wanna go read the original source of truth (iykyk): wxWidgets docs: wxGridSizer 🫢


πŸŽ€ DATA TYPES πŸŽ€

wxGridSizer() :: wx:wx_object().

that's it. that's the type. a whole wx:wx_object(). slay. ✨


πŸ”₯ FUNCTIONS πŸ”₯

πŸ’€ destroy(This :: wxGridSizer()) -> ok.

Destroys the object. bye bestie, you served. 🫑


πŸ’œ getCols(This) -> integer() when This :: wxGridSizer().

Returns the number of columns that has been specified for the sizer.

Returns zero if the sizer is automatically adjusting the number of columns depending on number of its children. To get the effective number of columns or rows being currently used, see GetEffectiveColsCount() (not implemented in wx). 😭


πŸ’– getHGap(This) -> integer() when This :: wxGridSizer().

Returns the horizontal gap (in pixels) between cells in the sizer.


πŸ’œ getRows(This) -> integer() when This :: wxGridSizer().

Returns the number of rows that has been specified for the sizer.

Returns zero if the sizer is automatically adjusting the number of rows depending on number of its children. To get the effective number of columns or rows being currently used, see GetEffectiveRowsCount() (not implemented in wx). 😭


πŸ’– getVGap(This) -> integer() when This :: wxGridSizer().

Returns the vertical gap (in pixels) between the cells in the sizer.


✨ new(Cols, [Option]) -> wxGridSizer()

new(Cols, [Option]) -> wxGridSizer()
             when
                 Cols :: integer(),
                 Option :: {gap, {W :: integer(), H :: integer()}}.

✨ new(Cols, Vgap, Hgap) -> wxGridSizer()

new(Cols, Vgap, Hgap) -> wxGridSizer()
             when
                 Cols :: integer(), Vgap :: integer(), Hgap :: integer();
        (Rows, Cols, Gap) -> wxGridSizer()
             when
                 Rows :: integer(),
                 Cols :: integer(),
                 Gap :: {W :: integer(), H :: integer()}.

✨ new(Rows, Cols, Vgap, Hgap) -> wxGridSizer()

new(Rows, Cols, Vgap, Hgap) -> wxGridSizer()
             when
                 Rows :: integer(),
                 Cols :: integer(),
                 Vgap :: integer(),
                 Hgap :: integer().

πŸ‘‘ setCols(This, Cols) -> ok

setCols(This, Cols) -> ok
                 when This :: wxGridSizer(), Cols :: integer().

Sets the number of columns in the sizer.


πŸ‘‘ setHGap(This, Gap) -> ok

setHGap(This, Gap) -> ok
                 when This :: wxGridSizer(), Gap :: integer().

Sets the horizontal gap (in pixels) between cells in the sizer.


πŸ‘‘ setRows(This, Rows) -> ok

setRows(This, Rows) -> ok
                 when This :: wxGridSizer(), Rows :: integer().

Sets the number of rows in the sizer.


πŸ‘‘ setVGap(This, Gap) -> ok

setVGap(This, Gap) -> ok
                 when This :: wxGridSizer(), Gap :: integer().

Sets the vertical gap (in pixels) between the cells in the sizer.


okay that's the whole thing, you're literally a grid sizer expert now πŸ’… mwah πŸ’‹

this page brought to you by Ericsson AB, wx 2.6, and the number wxGridSizer(3) πŸŽ€βœ¨ go forth and lay out ur children in a lil two-dimensional table, bestie πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from