O'Reilly logo

Practical Programming in Tcl & Tk, Third Edition by Brent B. Welch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Standard Dialogs

Several standard dialogs were added to Tk. These let you display alerts, prompt the user, choose colors, and select files using dialogs that are implemented in native look for each platform. For example, to ask the user a yes/no question:

tk_messageBox -type yesno \
    -message "Ok to proceed?" \
    -icon question
=> yes
					

To open an existing file:

set file [tk_getOpenFile]

The standard dialogs are described in Chapter 36 starting at page 515.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required