Foregroundcolor stuck?

Glasgow, David David.Glasgow at cstone-tr.nwest.nhs.uk
Mon Dec 9 09:51:00 EST 2002


Thanks again, Jan.  I have now got round to trying your suggestion, and of course it worked.  

I also see your explanation of the hierarchy for setting and changing text colour.  I think part of my confusion is that the colour palette doesn't reflect the effective text colour, but the setting for the field object or inherited colour.  Most of the time that is fine, but when text colour has been changed directly it would be handy to have some way of knowing that part or all of the text was not going to respond to the changes made via the palette.

Best wishes,

David Glasgow

Courses HTTP://www.i-Psych.co.uk 



 >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
 >Home/ forensic assessments --> <A 
 >HREF="http://members.aol.com/dvglasgow/">
 >DVGlasgow </A>
 >Courses --> <A HREF="http://www.i-Psych.co.uk">i-Psych</A>
 >
 >--__--__--
 >
 >Message: 13
 >Date: Sun, 8 Dec 2002 03:37:57 -0800 (PST)
 >From: Jan Schenkel <janschenkel at yahoo.com>
 >Subject: Re: Foregroundcolor stuck?
 >To: use-revolution at lists.runrev.com
 >Reply-To: use-revolution at lists.runrev.com
 >
 >--- 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.
 



More information about the use-livecode mailing list