Introduction
Thankfully, we are not limited to dialog windows of our own creation. Tk provides a full suite of predefined dialog windows to assist us in the more common tasks of collecting, notifying, and general interactions with the end user. These dialog windows allow us to rapidly create an interface that is both professional in appearance and familiar in functionality with minimum effort. As with all Tk-based windows, the appearance of the native OS is duplicated automatically.
Although you are displaying a full graphical window, the dialog windows are invoked in the same manner as a Tcl command. As such, to assign the return values from the various dialog windows to a variable, you must utilize the set
command in conjunction with the dialog commands.
Unless otherwise stated, we will need to access wish from the command line to complete the following examples. Launch the wish shell appropriately for your operating system and follow the instructions provided in each section.