changing answer style
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 33
- Joined: Mon Apr 27, 2009 3:32 pm
- Contact:
changing answer style
Sorry fo to many doubt about using Revtalk but has been two weeks learning the basic, but i was unable to find an answer for this:
i want to know if it is possible change the text style when we use answer command? for example i want to show to the user:
answer "Hello" && field "fname" && "the right answer is..." && tresult
where field "fname" is the name of the user who has been login at the beginning
tresult is the temporary variable that i used to keep some data.
So how can i change the text style of "fname" in the answer dialog? i would like to put emphasis in the "fname"
thanks so much
greg
i want to know if it is possible change the text style when we use answer command? for example i want to show to the user:
answer "Hello" && field "fname" && "the right answer is..." && tresult
where field "fname" is the name of the user who has been login at the beginning
tresult is the temporary variable that i used to keep some data.
So how can i change the text style of "fname" in the answer dialog? i would like to put emphasis in the "fname"
thanks so much
greg
Re: changing answer style
You can specify html tags in your prompt string to accentuate the parts you want.
From the dictionary
Will show an answer dialog with This is Bold This is Italic
From the dictionary
SoComments:
The prompt can be either formatted text (in the htmlText property's format) or plain text. If the prompt contains <p> or a start/end tag pair, the answer command assumes the text is in the same format as the htmlText property. Otherwise, the answer command assumes the text is plain text.
Code: Select all
answer "<B>This is Bold</b> <i>This is italic</i>"
-
- Posts: 33
- Joined: Mon Apr 27, 2009 3:32 pm
- Contact:
Re: changing answer style
Sturgis, thanks i am tried but it works fine with text not for field inside de answer, i put like this answer "hello" && "<b> field "fname" </b>" and i got an error i tried several form and just instead put the user name it put like a text field fname in bold. Where is my mistake?
thanks again
greg
thanks again
greg
Re: changing answer style
The tags have to be within quotes.
answer "some text here <b>" && field "the field" && "</b>"
answer "some text here <b>" && field "the field" && "</b>"
-
- Posts: 33
- Joined: Mon Apr 27, 2009 3:32 pm
- Contact:
Re: changing answer style
Sturgis you are the man, now is working i just put like this
answer "Hola" && "<b>" && field "fNombre2" && "</b>" && "el resultado es...." && tResult titled "Y la respuesta es........"
i now i will play around with other text style, i am not a contributor now in this forum but give another couple months and you wil see,
thanks a lot
greetings
Greg
answer "Hola" && "<b>" && field "fNombre2" && "</b>" && "el resultado es...." && tResult titled "Y la respuesta es........"
i now i will play around with other text style, i am not a contributor now in this forum but give another couple months and you wil see,

thanks a lot
greetings
Greg
-
- Posts: 33
- Joined: Mon Apr 27, 2009 3:32 pm
- Contact:
Re: changing answer style
wow now i am available to change size, color, font, etc using structure as html.
thanks Sturgis
thanks Sturgis
Re: changing answer style
Glad to help. 

Re: changing answer style
Hi,
Just to be on the safe side, you might want to start your answer text with <p> and finish it with </p> to make sure that the scripts in the answer dialog recognise your text as html code.
Best,
Mark
Just to be on the safe side, you might want to start your answer text with <p> and finish it with </p> to make sure that the scripts in the answer dialog recognise your text as html code.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 33
- Joined: Mon Apr 27, 2009 3:32 pm
- Contact:
Re: changing answer style
Thanks Mark i will do it.