Next: Source modules Up: Advanced features Previous: Templates

## Toplevel windows

Toplevel windows (including the main Tk window ``.'') contain the widgets that form the interface. The main Tk window ``.'' is the root of the widget tree. An application usually contains various dialog components implementing different aspects of the program. They have to be displayed depending on the current status of the program. This makes it important to be able to hide/show toplevel windows.

The main Tk window ``.'' can be hidden with the command: ```wm withdraw .```''. To display the window, the command: ```wm deiconify .```'' is called. This also works for the other toplevel windows, but XF provides an additional way to show/hide the toplevel windows. Each window can be displayed with the automatically created procedure ShowWindow.<toplevelName>. To remove a window, the procedure DestroyWindow.<toplevelName> is called.

When the code for the application is saved, the current display status of the toplevel windows is saved. This means that when the application is started, the toplevel windows that were displayed when the program was saved are displayed, and the toplevel windows that where hidden when the program was saved are not displayed. To change the display status of a window when developing with XF , the menu attached to the label (Current widget path:) in the main XF window can be used.