BoxSizers

From Dabo Wiki
Jump to: navigation, search

A type of layout control in wxPython. BoxSizers come in either horizontal or vertical styles, and they arrange their contents accordingly.

Sizers are used to spread controls out in an orderly fashion on a form, as opposed to absolute positioning, where controls are displayed with fixed sizes and positions. With sizers, resizing the form causes the sizers to resize their controls.

The only pro to using absolute positioning (that the objects stay where you put them, to the pixel) gets blown out of the water in multi-platform development, where fonts are going to differ and the platform-native controls are going to have slightly differing appearances. It is much more flexible to let a sizer decide how much room to give your controls.