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

The tk_dialog command presents a choice of buttons and returns a number indicating which one was clicked by the user. The general form of the command is:

tk_dialog win title text bitmap default ?label? ?label? ...

The title appears in the title bar, and the text appears in the dialog. The bitmap appears to the left of the text. Specify {} for the bitmap if you do not want one. The set of built-in bitmaps is given on page 541. The label arguments give labels that appear on buttons along the bottom of the dialog. The default argument gives the index of the default button, counting from zero. If there is no default, specify {} or -1.

Message Box

The tk_messageBox dialog is a limited form of tk_dialog that has native implementations ...

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