'''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 psuedo 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: * Uses Tile widgets if the Tile package is already loaded so your dialogs will look like the rest of your interfaces. * Keeps the event loop running. Doesn't hang your program. * Dialogs can timeout after a predefined period AND you can optionally choose to show the remaining time in the dialog's title bar. * Dialog buttons can be pressed programmatically. * Dialog button labels can be changed after the dialog has been displayed. * txmbox is written in Tcl so you can easily extend it's capability. * Dialogs can be made to wait for the user to respond or not. If the dialog is instructed to wait then, after the user clicks a button, the button label of the pressed button is returned. If the dialog is instructed not to wait then the call to the dialog returns the dialog windows path, ie; .txmboxXYZ. * The message widget is a text widget so it's text can easily be copied and pasted into other applications or emails. In fact, I'm looking at adding printing capability via a button 3 popup dialog. There's already a b3 popup that allows you to select all text and copy it to the cut buffer. Also, the text widget is disabled so the user can't mess with the message text. * You can have multiple instances of txmbox on the screen at one time. * New text can be added dynamically to existing dialogs AND you can set the foreground and background colors as you add new text. * Each dialog can be associated with a callback routine. * You may specify the complete geometry of the dialog or just it's size or position. * The dialog's position can be queried and saved so it can be repositioned according to the user's desire the next time it's presented. * Includes a built-in "Don't show this dialog again" function. * Includes an optional text formatting function. * Can wait for a known process ID to terminate. * Can be displayed without a titlebar. * Dialogs can be resized. * Can have a confirm sub-dialog. You know the old "Are you sure you want to do this?" Bill Gates really likes these. * Add an image or icon to the left side of the message. Uses the standard bitmap icons available in Tcl or you can supply your own images. * Can make a sound when dialog pops up. * Can be centered or otherwise positioned. * Can have custom button names OR use predefined button sets. * Dialog's information is retained after dialog is closed so it can be processed post dialog. Used memory can be recovered via the cleanMsgBox command. * Cross platform compliant. Works on Windows, Linux, and UNIX. It hasn't been tested on a Mac platform so I have no idea whether it will work there but I sure would like to get some feedback. * Extensive error checking. * The package also includes some useful routines that can be accessed separately from the messageBox. You can get a copy of it here [http://doveware.com/txmbox1.0.zip]. View the documentation here [http://doveware.com/txmbox.html]. 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? ---- [Category Dialog] - [Category Command] - [Tk syntax help]