Chapter 11. Using Tcl Built-in Dialog Windows
In this chapter, we will cover:
Displaying a message box
Displaying a confirmation dialog
Displaying the color picker
Displaying the directory dialog
Displaying the file selection dialog
Selecting a directory and file
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...