wxSizerFlags

wxSizerFlags

wxSizerFlags
Functions for wxSizerFlags class

Container for sizer items flags providing readable names for them.

Normally, when you add an item to a sizer via wxSizer:add/4, you have to specify a lot of flags and parameters which can be unwieldy. This is where wxSizerFlags comes in: it allows you to specify all parameters using the named methods instead. For example, instead of

you can now write

This is more readable and also allows you to create wxSizerFlags objects which can be reused for several sizer items.

Note that by specification, all methods of wxSizerFlags return the wxSizerFlags object itself to allowing chaining multiple methods calls like in the examples above.

See: wxSizer

wxWidgets docs: wxSizerFlags

Types

Direction = Borderinpixels = integer()

Sets the wxSizerFlags to have a border of a number of pixels specified by borderinpixels with the directions specified by direction.

Prefer to use the overload below or DoubleBorder() (not implemented in wx) or TripleBorder() (not implemented in wx) versions instead of hard-coding the border value in pixels to avoid too small borders on devices with high DPI displays.

Types

Aligns the object to the left, similar for Align(wxALIGN_LEFT).

Unlike align/2, this method doesn't change the vertical alignment of the item.

Types

Aligns the object to the right, similar for Align(wxALIGN_RIGHT).

Unlike align/2, this method doesn't change the vertical alignment of the item.