Setting more than 1 textStyle
drothe at optusnet.com.au
Fri Dec 31 18:20:58 CST 2004
On 12/26/04 9:16 PM, "D.Rothe" <drothe at optusnet.com.au> wrote:
> Setting more than 1 textStyle
> With the following script it obviously sets the hilited word of a field to the
> chosen style. Select another style and it resets the word to plain text before
> applying the new style!
> How can I set the hilited word to more than one textStyle.... e.g Bold, Italic
> & Underlined or what ever combination?
> Is there a way to lock the text first or ???????????????
No, you get the textStyle of the selection, and then add another style to
make a combination. For e.g, if the textStyle if "plain", you replace it
with "bold", "italic", etc. If it is something other than "plain", you add
it with a comma between: "bold,italic", "italic,underline",
Yep all sorted out, thanx for the input, I used the following code for each style;
if textStyle of the hilitedText is empty then
set textStyle of the hilitedText to "bold"
set textStyle of the hilitedText to \
(textStyle of the hilitedText) & comma & "bold"
Thank & Cheers Dwayne...
More information about the use-livecode