A New tk_messageBox Widget For Tcl/Tk
I've modified the built-in
tk_messageBox widget of Tcl/Tk
in three ways:
- On UNIX systems with a color depth of 4 or more, the icons are
shown in color instead of black-and-white.
- The message box is centered over the window identified by the
-parent option ("." by default). If the parent window doesn't
exist or is iconified, the message box is centered in the whole
screen.
- On an error dialog, the button says "Bummer" instead of "OK",
since errors are never ok.
The interface to the new tk_messageBox is exactly the same as the original.
You should be able to drop this new module into your existing Tcl/Tk
programs without having to change a thing.
The code is in a file named msgbox.tcl.
Just download it and make is a part of your program, or use it
to replace the "msgbox.tcl" file in the standard TCL library
(usually located at /usr/local/lib/tk8.X or /usr/lib/tk8.X).
The following table shows a comparison of the old and the new
tk_messageBox widgets:
More Tcl/Tk Widgets