Icons, big "answer" box

Wilhelm Sanke sanke at hrz.uni-kassel.de
Sun Feb 1 12:25:21 EST 2004


On 31 Jan 2004  Thomas Cole <Tom.Cole at asu.edu> wrote

> (snip)
> 1. When you use the answer "whatever" command in RR, the box that 
> comes up is often so darned big that it spreads across the screen and 
> you have to pull it around to read it. I have a program that gives 
> instructions using the answer this or that command and this is a real 
> problem. Is there any way to make answers appear neatly as they used 
> to do in HyperCard?
> (snip)
> What am I doing wrong?
>
> Many thanks,
> Tom


and on Sat, 31 Jan  Richard Gaskin wrote:

> I believe there is a Bugzilla report for this.  Please consider voting for
> it.
>
> -- Richard Gaskin Fourth World Media Corporation


and on Sun, 1 Feb Bj?rnke von Gierke<bvg at mac.com> wrote:

> You can also try to wrap your messages yourself so instead of:
>
> answer "very long text that stretches the message box way beyond the
> screen borders."
>
> you could write
>
> answer "very long text that stretches the message box" & return & "way
> beyond the screen borders."


Maybe there is a Bugzilla report for this, but the "big" answer dialog 
is not really a bug, but rather an intended feature.

Three recommendations to get a a better proportioned width of the 
"answer dialog":

1. Open the card script of stack "answer dialog"

  - comment line "#set the width of button i to 82"
add a new line after that line, namely  "set the width of btn i to the 
formattedwidth of btn i + 10"
 
 - comment line  "#if the width of btn i < the formattedWidth of btn i 
+28 then set the width of btn i to the formattedWidth of btn i + 28"

- comment line "#if tWidth < 400 then put 400 into tWidth"

Additionally use Björnke von Gierkes recommendation to wrap the message like

  answer "very long text that stretches the message box" & return & "way
beyond the screen borders."

Together this should produce acceptable results.

2. Use the "answer dialog" of the Metacard IDE

   Add the Metacard "answer dialog" to your stack as a substack. When 
you use the "answer" command, this substack will be called instead of 
the Rev stack. (Of course you could also permantly replace the Rev 
"answer dialog" stack with the Metacard IDE stack in the Rev IDE).

The Metacard "answer dialog" is much "smaller", proportioned, and 
somewhat more flexible.
So you can set the textsize (set the textsize of stack "answer dialog" 
to 16), which is not possible with the Rev "answer dialog" unless you 
change the "presets" in the script of the dialog - necessary then each 
time you want to have a different textsize.
What you can do with the text of the Rev dialog is to set the 
"textstyle" - for example to bold - to improve the readability of the 
tiny text of the Rev dialog.

3. Design you own modal dialogs

Usually I use the Rev and Metacard "answer dialogs" - and for that 
matter the "ask dialogs" - mainly during development as an interim solution.
For a completed project I often add my own custom dialogs specifically 
adapted to the needed user input.

For example:  I want the user to select a  number of problems from a 
"repertoire" field or file, the range being from 4 to 50.
Even with the smaller Metacard "ask dialog" the width of the  input 
field for this  two-digit number is out of proportion (and could hold 
billions).

With a custom dialog - designed from scratch or as a modified dialog - 
you can control all kind of options you want to have, e.g. the location 
of the modal dialog on the screen or relative to the stack.
I have used such a custom dialog in my stack "Topsearch" (see Rev "user 
contributions").

Regards,

Wilhelm Sanke




More information about the use-livecode mailing list