colors in scrolling text field

Eric Chatonet eric.chatonet at sosmartsoftware.com
Tue Aug 23 17:38:21 EDT 2005


Hi Jon,

Le 23 août 05 à 23:18, Jon a écrit :

> I am creating a scrolling log of program activities, and want to  
> color code the output so that normal events are black or green, but  
> problems are shown in red.  I played with setting colors in a  
> regular field, and the colors seem to stick to the field positions,  
> rather than moving with the characters.  Am I correct about this?
>
> I tried setting the foregroundcolor in a text chunk that was stored  
> in a local variable, but that failed.  The idea was to set the  
> colors up in the string before it went out to the scrolling field,  
> in the hopes that the colors would magically be set in the string  
> and follow the characters out to the scrolling field.  This does  
> not seem to work either.
>
> Am I trying to do something that is not possible in Rev, or am I  
> just not clear on how to accomplish this?  I know that HTML support  
> is somehow built into parts of Rev: would using <font color=green>  
> work?  I tried it, and it did not work trivially.

Using HTML is the right way to display coloured text and more  
generally styled text:
(here a tab delimited list where each line has a different colour and  
the first one is in bolded style)

<p><font color="#006400"><b>1/14/05	4:06:38 PM	Start</b></ 
font></p>
<p><font color="#804000">1/14/05	5:56:47 PM	Auto  
backup	Done	Mailing base_3</font></p>
<p><font color="#646464">1/14/05	6:26:51 PM	Auto  
backup	Undone	Unchanged file size</font></p>

You might be interested in the Encoded Text Picker plugin which  
translates both to and from HTML and/or URLEncode, letting you to set  
styles, colors, etc. and watch the resulting html code and the "How  
to Create and Manage HTML lists" tutorial.
Both are available from my website.

Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        eric.chatonet at sosmartsoftware.com/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------




More information about the use-livecode mailing list