OptionDialog
Description
OptionDialog is a window that you can add to your project that lets you display dialogs with many options. I wrote it because the standard MsgBox doesn't look like I want and offers no
formatting or additional buttons.
Credits
As usual, several of the ideas that went into OptionDialog were formulated while reading Matt Neuburg's "REALbasic: The Definitive Guide".
I know that there are similar efforts by several of the REALbasic NUG contributors, but I wanted to write my own, partially as a learning exercise, but also because I had a set of criteria
in mind that I don't recall seeing in anyone's description of their offering. But, frankly, I didn't even look at any of these other offerings.
Requirements
- REALbasic 2.1a1 or above. The code in OptionDialog should work just fine in an earlier version, but the file format changed at 2.1a1 so you'll have to cut & paste the the guts
yourself.
Features
- User-specified number of buttons. You supply the text for each as well as whether they have their Cancel or Default properties set.
- Variable amount of text, with or without the system beep.
- No, stop, caution, note, or user-supplied icon (cicn) displayed.
- Auto-sizing to accomodate the number of buttons, presence of icon, and amount of text.
- Open source. Can be carved up any way you like.
- Version 1.1 adds the window title to the list of parameters and changes the default window type to Movable Modal.
- It's WhiskeyWare. The idea here is that if you use and like OptionDialog then you send me something that I use and like in return, a sample of your favorite whiskey.
Version History
- OptionDialog version 1.0 - 01/02/00
-
OptionDialog version 1.1 - 12/02/01
- Adds the window title to the list of parameters and changes the default window type to Movable Modal.
- Conditional compilation now ignores custom icons for Win32 builds, as references to resourcefork cause build failures in some versions of REALbasic and custom icon files won't load
(even with QuickTime installed) with any version of REALbasic.
Download
You'll need Stuffit Expander 5.5 to expand this archive.
OptionDialog version 1.1
You can send questions/suggestions/comments to me here.