Sizers

Sizers
Automatically manage resizing controls

Sizers take care of resizing and repositioning controls within a window whenever the window is resized. Sizers may be nested within each other to create complex relationships between the controls in a window.

The most common sizer used will be the wxBoxSizer.

Functions/Procedures
Subtopics

Sizers

[proc]
add_sizer_to_sizer
( atom sizer1, atom sizer2, atom option, atom flag, atom border )

Category: Sizers

This adds sizer2 to sizer1.


Sizers

[proc]
add_window_to_sizer
( atom sizer, atom window, atom option, atom flag, atom border )

Category: Sizers

This adds the specified window (i.e., control) to the sizer.


Sizers

[proc]
detatch_sizer
( atom sizer, atom detach )

Category: Sizers

Detach a child from the sizer without destroying it. his method does not cause any layout or resizing to take place, call layout_sizer() to update the layout "on screen" after detaching a child from the sizer.


Sizers

[func]
fit_window
( atom sizer, atom window )

Category: Sizers

Tell the sizer to resize the window to match the sizer's minimal size. Returns the new size.


Sizers

[func]
get_sizer_minsize
( atom sizer )

Category: Sizers

Returns the minimal size of the sizer. This is either the combined minimal size of all the children and their borders or the minimal size set by set_sizer_min_size(), depending on which is bigger


Sizers

[func]
get_sizer_position
( atom sizer )

Category: Sizers

Returns the current position of the sizer.


Sizers

[func]
get_sizer_size
( atom sizer )

Category: Sizers

Returns the current size of the sizer.


Sizers

[func]
get_sizer_window
( atom sizer )

Category: Sizers

Returns the window this sizer is used in or NULL if none.


Sizers

[proc]
layout_sizer
( atom sizer )

Category: Sizers

Call this to force layout of the children anew, e.g. after having added a child to or removed a child (window, other sizer or space) from the sizer while keeping the current dimension.


Sizers

[func]
replace_sizer_item
( atom sizer, atom old_item, atom new_item, atom recursive )

Category: Sizers

Replaces one item with another. Both old_itm and new_item must be either sizers, or both must be objects derived from a wxWindow.

Use parameter recursive to search the given element recursively in subsizers.

You must call layout_sizer() to have the sizer adjust the display.


Sizers

[proc]
set_sizer
( atom window, atom sizer )

Category: Sizers

This must be called before a sizer will resize its children. window is the parent window of the controls to be resized. The sizer will resize and reposition its children based on window.


Sizers

[proc]
show_sizer_item_sizer
( atom sizer, atom item, atom show, atom recursive )

Category: Sizers

Shows or hides sizer item. To make a sizer item disappear or reappear, you must call layout_sizer() after this procedure.

Use parameter recursive to search the given element recursively in subsizers.


Sizers

[proc]
show_sizer_item_win
( atom sizer, atom item, atom show, atom recursive )

Category: Sizers

Shows or hides window item. To make a sizer item disappear or reappear, you must call layout_sizer() after this procedure

Use parameter recursive to search the given element recursively in subsizers.


Sizers

[func]
sizer_calc_min
( atom sizer )

Category: Sizers

Have the sizer perform the actual calculation of its children's minimal sizes. The size is returned as a sequence.


Sizers

[func]
sizer_item_shown
( atom sizer, atom item )

Category: Sizers

Returns true if the item is shown in the sizer.


Sizers

[proc]
space_sizer
( atom sizer, atom width, atom height, atom option, atom flag, atom border)

Category: Sizers

Adds a blank region to the sizer in order to space controls within a sizer.