txmbox is an attempt to provide a general purpose informational dialog tool to replace tk_messageBox. txmbox adheres to all the tk_messageBox options, improving on many of them. Also, txmbox adds so many additional features that you may never need to build another informational dialog box. txmbox is a pseudo widget. The only exception to compatibility with tk_messageBox; the default for -icon is to not display an icon.
Here's a list of most of the features included in this package:
You can get a copy of it here [L1 ]. View the documentation here [L2 ]. View the change log here [L3 ].
I hope you find it useful and please let me know if you have any feature request or find any bugs.
Enjoy, Robert Joy
MG I tried to test this briefly on Windows, but it failed because I don't have twapi installed. Since the code works fine on Linux, is TWAPI really needed on Windows? Could it be made optional (assuming it just provides some extra features otherwise not available)?
Robert Joy - txmbox relies on twapi to detect running processes that are to be monitored for completion. I could possibly make it optionally based on use of that feature. I'll check into it.
Synic 2006-09-10 - On Mac OS X, txmbox 1.0 never enables the Ok button. This does seem to be a good project though. An additional suggestion: see if you can use the colour images tk_messageBox uses on MS Windows for icons. The old style one-colour bitmaps look very dated these days.
Robert Joy - Thanks Synic for checking this out on a Mac and for the suggestion with the icons. I'm a bit baffled as to why the button never enables as I never disable any buttons. Might have something to do with the Grab Stack mechanism I created for ensuring windows sit on top of their parent but I would really need to get my hands on a Mac (I don't have one but might have a friend that could help me out) to fix this issue. As for the bitmaps that should be doable. I debated about this and came to the conclusion that as a first pass it would be ok. I'll add that to the todo list.
Robert Joy 2006-09-10 (5PM PST): I just had another thought about why the buttons on a Mac are not enabling; I'm using BWidget buttons for this interface. Anybody know if these work on a Mac?
RLH BWidgets is installed with the ActiveTcl distro so I would say "yes".
Synic 2006-09-11 - It's possible what's really happening is that the Ok box isn't in -state disabled but also isn't able to accept a focus or click because some other part of the dialog has been grabbed or has focus. The Mac platform is odd like that. (For example, the Tile package's ttk::combobox widget is unusable on the platform because the combobox grabs and pushes the rest of the dialog into a background state. You're forced by practicality to fork code so that anything using comboboxes on any other platform uses ttk::menubuttons and menus on OS X.)
Robert Joy 2006-09-11 (5:58am) PST - Interesting! In txmbox the dialog toplevel has the grab and (initially, the default button has the focus. When you run your mouse over the message area it then takes the focus. But none of these should effect whether the button works. Very odd.
Also, I did some poking around on the internet and found a site ([L4 ] see the BWidget 1.7 Fixes entry) that gave the following statement button.tcl: The primary change I made is to add a handler for the "Activate" event. On the Mac, an activate event is generated every time you leave the wish application, utilize another app, then return to wish. If this event isn't handled, then the button states aren't updated properly. Not sure if this would affect the enable/disable behavior but it might. So this may be something that will work better in BWidgets 1.8.
Robert Joy 2006-10-08 (9:23am) PST - Bugs fixes and documentation changes. Latest version is 1.0.8. This version represents a more stable release. I found a few problems that were largely issues that should be resolved by Tk. The windows are much more solid as they popup. Overall a much cleaner presentation.
HaO 2011-09-20 Within the source code, the sequence:
if { [ regexp {Tile} [info loaded] ] } {
is used to detect themed widget. This will not work from tcl 8.5 on, as ttk is not a loadable dll any more with the name 'tile'.