how to set font of ask/answer dialogues

Wilhelm Sanke sanke at hrz.uni-kassel.de
Sat May 29 12:40:54 EDT 2004


On Sat, 29 May 2004 "kweto" <nrkweto03 at hotmail.com> wrote:

> For my Japanese-speaking users, how do I set the fonts of a stack's
> ask/answer dialogues? In MC, I seem to recall that these dialogue windows
> were actually MC stacks, and therefore modifiable. But I can't find
> something similar to those stacks in RunRev.
>
> Thank you.
> --
> Nicolas Cueto
> niconiko language school


Klaus Major <klaus at major-k.de> answered:

> It is exactly the same as in MC...
>
> Open the "Application Browser" (select "Rev UI Elements in lists" in
> the "View" Menu),
> and find these substacks in the "home" stack, ready to be modified...
>
> But i am not sure if there are Rev front- or backscripts that might
> override the new settings...


This time there are no such front- or backscripts that interfere, but 
there are 23 lines in the card script of the "answer dialog" that refer 
either to textfont or textsize.

With the Metacard answer dialog - which you can use in Revolution, too - 
this was simple, you just put two extra lines into your script before 
using the "answer" command, like this

"set the texfont of stack "answer dialog" to verdana
set the textsize of stack "answer dialog" to 16
answer "whatever" with "this" or "that" ".-

And Jan Schenkel <janschenkel at yahoo.com> answered:

> However, it might be easier to pass htmlText to your
> ask/answer command ; try this :
> --
>   anwer the htmltext of field "MyField"
> --
> You'll have to learn how to tinker the htmlText to get
> it right ; one thing is that you'll have to pass the
> font for each paragraph of text.


The problem with this approach is that you have first to put a text in 
your field "MyField" and set it to htmltext;
if you tinkered that correctly the question or initial statement in the 
answer dialog will indeed show the new html properties, but not the 
*buttons* of the answer dialog ("OK" etc.).-

For my own purposes I have modified the Rev answer and ask dialogs - see 
"Transparent Dialogs" in "user contributions" on the RunRev site - to be 
able

- to set textfont and textsize (as mentioned for Metacard above)
- to reduce the enormous widths of the Rev dialogs, that sometimes 
extend across the whole screen and beyond
- to set the dialogs to any loc on the screen with a custom property 
"NewLoc"

You can comment or delete the special "snapshot routine" in my scripts 
that creates a pseudo-transparency for the dialogs.

To override the proper Rev dialogs make my dialogs substacks of your 
stack in question.

One more recommendation if you should take a look at my stacks: Put my 
answer and ask dialog into a subfolder and open them from there before 
setting them as substacks; otherwise you might end up with the original 
Rev answer dialog as a substack.

Hope this helps, too.

Wilhelm Sanke




More information about the use-livecode mailing list