Contents Up Previous Next

wxSizerFlags

PRELIMINARY.

Normally, when you add something to a sizer via wxSizer::Add, you have to specify a lot of flags and parameters. This can be unwieldy.

This is where wxSizerFlags comes in. Instead of a bunch of flags and other stuff, you can use wxSizerFlags, which is a convenient class for doing so.

Note that by specification, all methods of wxSizerFlags return the wxSizerFlags object itself to ease the calling of multiple methods at a time.

wxSizerFlags::wxSizerFlags
wxSizerFlags::Align
wxSizerFlags::Border
wxSizerFlags::Center
wxSizerFlags::Centre
wxSizerFlags::Expand
wxSizerFlags::Left
wxSizerFlags::Proportion
wxSizerFlags::Right


wxSizerFlags::wxSizerFlags

wxSizerFlags(int proportion = 0)

Creates the wxSizer with the proportion specified by proportion.


wxSizerFlags::Align

wxSizerFlags& Align(int align = 0)

Sets the alignment of this wxSizerFlags to align.

Note that if this method is not called, the wxSizerFlags has no specified alignment.

See also

Left,
Right,
Centre


wxSizerFlags::Border

wxSizerFlags& Border(int direction, int borderinpixels)

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

wxSizerFlags& Border(int direction = wxALL)

Sets the wxSizerFlags to have a border of a default size with the directions specified by direction.


wxSizerFlags::Center

wxSizerFlags& Center()

Sets the object of the wxSizerFlags to center itself in the area it is given.


wxSizerFlags::Centre

wxSizerFlags& Centre()

wxSizerFlags::Center for people with the other dialect of english.


wxSizerFlags::Expand

wxSizerFlags& Expand()

Sets the object of the wxSizerFlags to expand to fill as much area as it can.


wxSizerFlags::Left

wxSizerFlags& Left()

Aligns the object to the left, shortcut for Align(wxALIGN_LEFT)

See also

Align


wxSizerFlags::Proportion

wxSizerFlags& Proportion(int proportion = 0)

Sets the proportion of this wxSizerFlags to proportion


wxSizerFlags::Right

wxSizerFlags& Right()

Aligns the object to the right, shortcut for Align(wxALIGN_RIGHT)

See also

Align