Creating a Dummy Dialogue Box
-
Guys, Is there a simple way of creating a Dialogue Box? Say I want to explain to someone how I think an input dialogue box should look; is there a simple way to do it or do I need to be a bloody programming guru???
Maybe just do it in a graphics app.
-
How about producing a 2D graphic of one, then importing it as a foreground watermark?
-
inputbox(["Prompt1: ", "Prompt2: ", "Prompt3: "], [1, "Cat", "Yes"], ["", "","Yes|No|Maybe"], "Title")
Copy past this code in the Ruby Console and press <enter> to see the result.
Change the text for the Prompts and Titles as desired.
The first [] contains the prompts, the second [] the default values to display, the third [] is the dropdown lists if any (with a "" when NOT used) and the fourth item is the "Title" which is displayed on the dialog's top bar.
This example assumes an integer for value-1 [i.e. NO "" around it], a changeable "string" for value-2, and a choice from a dropdown list for value-3. Note how all strings are inside "" and a dropdown list is made as one string with '|' between each item.
Other types of defaults can be used like a 'float' e.g. 1.234, and a 'length' e.g. 456.mm...
If you add additional 'Prompts' [remember to use the ',' separators] remember to add equivalent default values and dropdown items to avoid errors... -
Thanks TIG, I'll give it a whirl...
I wasn't thinking about creating it in SU particularly Alan but that's a good idea!
Cheers,
Advertisement