Next: Layouting with the placer Up: The first steps Previous: Inserting widgets into the

## Layouting widgets

When all widgets are inserted into the widget tree, respectively the widgets that should be inserted at this time, the layouting starts. Typically, the basic layout structure of an application is defined by using frame widgets. Widgets are grouped together by inserting them into the same frame.

The widgets are placed in their parents by the geometry managers. Tk provides two geometry managers, the packer and the placer . Which one is used depends on the needed result, and the preference of the user. It is possible, but not recommended, to combine the two layouting methods in the same toplevel window. Both geometry managers ignore the widgets managed with the other geometry manager. So it can happen that widgets accidentally overlap, or the size of a widget is not computed correctly. The combination of both methods should be used only by the experienced user, as it is necessary that both concepts are really understood in their effects. The draft of John Ousterhout's[#Ouster93a##1#] book explains the Tk geometry managers in detail.

The user can choose between two ways of layouting with XF . He can manipulate the widgets directly (usually when the widgets are placed), or he can use special dialogs where all parameters for the layouting can be set (the usual way for packed widgets). Direct manipulation is only possible when the layout dialog (Configuration | Layouting) is activated. This dialog is intended to prevent unintentional widget layouting during the development and provides minimal access to some layout parameters.

- Layouting with the placer
- Layouting with the packer