wxGridSizer(3erl)
πΈ wxGridSizer (3erl) πΈ
okay bestie so this is the Erlang module definition for wxGridSizer β yes it's a real Erlang thing, no I'm not kidding, and yes it's giving very much "I make your UI look like a spreadsheet but make it fashion" π
β¨ NAME β¨
wxGridSizer β literally just functions for the wxGridSizer class. that's the whole name. iconic, minimal, ate. π
π DESCRIPTION π
okay so picture this: a grid sizer is a sizer that lays out its children in a two-dimensional table where every single field is the same size. like a group chat where everyone gets an equal amount of space and nobody's hogging the spotlight π«Ά
and how does it pick that size? lowkey simple:
- the width of each field is the width of the widest child πͺ
- the height of each field is the height of the tallest child π
so the biggest kid in the room sets the standard for everybody. main character energy fr fr π
see: wxSizer, Overview sizer
this class is derived (and can use functions) from: wxSizer β so it inherited everything and honestly it's thriving π
wxWidgets docs: wxGridSizer β go read the source material bestie, iykyk π
π¦ DATA TYPES π¦
wxGridSizer() = wx:wx_object()
that's it. that's the data type. it's just a wx object and we respect it for that π
π EXPORTS π
β new(Cols) -> wxGridSizer()
Types:
Cols = integer()
make a fresh new sizer with Cols columns. sparkly and new, no cap β¨
β new(Cols, Options :: [Option]) -> wxGridSizer()
Types:
Cols = integer()
Option = {gap, {W :: integer(), H :: integer()}}
same deal but now you get an options list, and the option is {gap, {W, H}} where W and H are integers. put some breathing room between your cells bestie, they deserve it π
β new(Cols, Vgap, Hgap) -> wxGridSizer()
(no explicit types block on this one, it's mysterious like that π)
three args: Cols, Vgap, Hgap. vertical gap, horizontal gap, all the gaps. gap game strong π
β new(Rows, Cols, Gap) -> wxGridSizer()
Types:
Rows = Cols = integer()
Gap = {W :: integer(), H :: integer()}
now you're specifying Rows and Cols, plus a single Gap tuple {W, H}. a full-on grid, fully booked, no vacancies π
β new(Rows, Cols, Vgap, Hgap) -> wxGridSizer()
Types:
Rows = Cols = Vgap = Hgap = integer()
four integers, maximum control, Rows, Cols, Vgap, Hgap. this is the deluxe version and honestly? obsessed π
π getCols(This) -> integer()
Types:
This = wxGridSizer()
returns the number of columns that have been specified for the sizer.
heads up bestie: it returns zero if the sizer is automatically adjusting the number of columns depending on the number of its children π³
and if you want the effective number of columns or rows being currently used? that's GetEffectiveColsCount() β but plot twist, not implemented in wx π so don't come for me, it's just not there.
πΈ getHGap(This) -> integer()
Types:
This = wxGridSizer()
returns the horizontal gap (in pixels) between cells in the sizer. that's the side-to-side personal space ππ
π§ getRows(This) -> integer()
Types:
This = wxGridSizer()
returns the number of rows that have been specified for the sizer.
again: returns zero if the sizer is auto-adjusting the number of rows based on how many children it has π
want the effective count? that's GetEffectiveRowsCount() β and nope, not implemented in wx. we suffer together π
π getVGap(This) -> integer()
Types:
This = wxGridSizer()
returns the vertical gap (in pixels) between the cells in the sizer. up-and-down breathing room, we stan π¬οΈ
π setCols(This, Cols) -> ok
Types:
This = wxGridSizer()
Cols = integer()
sets the number of columns in the sizer. you're in charge now π
π₯ setHGap(This, Gap) -> ok
Types:
This = wxGridSizer()
Gap = integer()
sets the horizontal gap (in pixels) between cells in the sizer. spread them out a lil, let them vibe π¦
π setRows(This, Rows) -> ok
Types:
This = wxGridSizer()
Rows = integer()
sets the number of rows in the sizer. stack 'em up β
π setVGap(This, Gap) -> ok
Types:
This = wxGridSizer()
Gap = integer()
sets the vertical gap (in pixels) between the cells in the sizer. vertical space is self care fr fr πββοΈ
π destroy(This :: wxGridSizer()) -> ok
destroys the object. rip to it honestly, it served its purpose π«‘β¨
and that's the whole page bestie, no notes, go build something cute with your uniform grid ππ
~ cute lil sign-off ~ brought to you by the wxWidgets team, and this particular page is from wx 2.2.2.1 β from me and the grid sizer, mwah ππ¦
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms