Foregroundcolor and chunk formatting in general

Ivers, Doug E Doug_Ivers at lord.com
Mon Dec 9 12:11:00 EST 2002


> -----Original Message-----
> From: Jan Schenkel [mailto:janschenkel at yahoo.com]
> Sent: Monday, December 09, 2002 11:50 AM
> To: use-revolution at lists.runrev.com
> Subject: RE: Foregroundcolor and chunk formatting in general
> 
> 
> --- "Ivers, Doug E" <Doug_Ivers at lord.com> wrote:
> > How do I remove any chunk-specific coloring that may
> > exist in a field?
> > 
> >    set the textColor of char 1 to -1 of me to empty 
> >  ???
> > 
> > How do I remove other chunk-specific formatting?
> > 
> >    set the textFont of char 1 to -1 of me to empty
> >    set the textStyle of char 1 to -1 of me to plain
> > 
> > Note that, if the FIELD's textStyle is bold, then I
> > want to revert to that.
> > 
> > 
> > -- D
> > 
> 
> Hi Doug,
> 
> Actually, the simplest way to erase all attributes for
> the entire content of the field, is :
>   set the text of fld "foo" to the text of fld "foo"
> This resets the htmlText property where all the
> formatting per chunk is stored.
> 
> Hope this helped,
> 
> Jan Schenkel.
> 

Wow, that's a useful tip -- thanks!

What if one wants to reset only the color and leave other formatting intact?


-- D
 



More information about the use-livecode mailing list