Some widgets serve a higher purpose: they organize and present other widgets.
These widgets are called containers. This means that they may contain one or more of other widgets and control their relative layout as well as present some decoration alongside the contained widgets. Examples:
- • vertical box
- • horizontal box
- • table
- • button
The contained widgets are container's children.
Containers usually respond to resize events and addition and removal of children by reallocating the available space among its remaining children.
Since a container is also a widget, we can nest containers to an arbitrary degree: a vertical box containing a table containing a button containing a label.