Foregroundcolor stuck?
Jan Schenkel
janschenkel at yahoo.com
Sun Dec 8 06:44:01 EST 2002
--- DVGlasgow at aol.com wrote:
>
> In a message dated 6/12/02 4:58:17 PM,
> use-revolution-request at lists.runrev.com writes:
>
> << The thing is that once you set the colour of
> certain
>
> words, you have to reset the colour of the entire
>
> "chunk" of text, because otherwise it's overridden
> by
>
> the colour of the individual words.
>
>
> Try this:
>
>
> on greyme
>
> set the textColor of char 1 to -1 of me to "gray"
>
> end greyme
>
>
> Hope this helped,
>
>
> Jan Schenkel. >>
>
> Of course!
>
> Thanks Jan. I don't even need to try this to be
> sure you are right!
>
> I am not sure it is entirely logical though
> ----Standing by for someone to
> explain to me why it is ;-)
>
>
> Best wishes,
>
> David Glasgow
>
Look at it this way: you can 'layer' one coat of paint
onto another. By default, the text uses the colour
settings of the field (or, if these settings haven't
been specified, the colour setting "up the chain") ;
but when you set the colour of a specific chunk, it
saves this colour with the chunk.
So when the engine draws the text, it first looks at
the settings of the chunk, then the settings of the
field, then higher "up the chain" to determine the
applicable colour settings.
Which means that in order to make all the words in a
field gray after their colour was changed, you have to
change their individual settings.
Hope this cleared a few things up,
Jan Schenkel.
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
More information about the use-livecode
mailing list