Colorizing List Fields

Sarah Reichelt sarah.reichelt at gmail.com
Sat Jun 23 02:02:41 EDT 2007


> > While either of these approaches will work, the html version is much
> > faster if you have to color a lot of lines because you can work in a
> > variable instead of directly in a field.
> >
> > I have a printout generation routine where every 2nd line changes
> > color and there are about 6000 lines. Using "set the textColor" took
> > several minutes, but building the html to change colors happens almost
> > instantly.
> So how do you set the backgroundColor of the line using html?
> This will come in handy on my next project.

I made a field and set the forecolor of mine 1 to red, and the
backcolor of line 2 to blue. This is what the htmlText of the field
then becomes.

<p><font color="#FF0000">Line 1</font></p>
<p><font bgcolor="#0000FF">Line 2</font></p>

However, the blue background for line 2 only covers the actual text,
it doesn't fill the line.

Cheers,
Sarah



More information about the use-livecode mailing list