A dialog window is usually shown from an application as a temporary display to show information or to query the user. As the Tk [toplevel] command is a general purpose command for creating application windows there are a few things that should be set to make a dialog look standard. Most window managers handle dialog windows differently to application windows. For instance a dialog may not show up in the taskbar and may have different frame decorations (the buttons on the outside edge) and even different animations when being mapped and unmapped. This is usually handled by setting the dialog toplevel to be '''transient''' with regards to the parent or owner window. This is often sufficient but on modern X11 systems if might also be helpful to set the toplevel type to ''dialog'' as well (Tk 8.6): ====== set dialog [toplevel $parent -class Dialog] wm transient $dialog $owner catch {wm attributes $dialog -type dialog} ====== '''Note''' that if you need a messagebox then you should use [tk_messageBox] which will use the native messagebox dialogs on windows and MacOSX. For quick and dirty (and ugly) general purpose dialogs see the [tk_dialog] command. There are some built-in dialogs which may defer to system native equivalents where available. See: * [tk_chooseColor] * [tk_chooseDirectory] * [tk_getOpenFile] * [tk_getSaveFile] * [tk_messageBox] * [tk fontchooser] ---- [http://incrtcl.sourceforge.net/iwidgets/iwidgets/dialog.gif] [incr Widgets] also has a dialog command - see the docs at http://incrtcl.sourceforge.net/iwidgets/iwidgets/dialog.html and http://purl.org/tcl/home/man/iwidgets3.0/dialog.n.html . ---- [LV] When using wish, there are at times errors reported in what I presume are dialog boxes. When these boxes appear, the user is unable to copy and paste the information about the error into another file. Is there anything which a developer can do in these cases to make the error reporting better? ---- **See also** * [A file properties dialog] * "The Humble Dialog Box" [http://www.objectmentor.com/resources/articles/TheHumbleDialogBox.pdf]. * [A little value dialog] * [Another little value dialog] * [An option dialog] * [Dialog box maker] See also the dialog in the [tklib] widget package. [http://tcllib.sourceforge.net/doc/widget.html] ---- [bugant] tk-goodies provides a nice dialogs package and they look more cleaner and beauty than the tk_dialog ones. For more info, screenshot and download visit tk-goodies website [http://tk-goodies.berlios.de] [http://tk-goodies.berlios.de/img/info.png] <> Dialog | Arts and Crafts of Tcl-Tk Programming