Colorizing List Fields
Ken Ray
kray at sonsothunder.com
Thu Jun 21 12:06:16 EDT 2007
On Thu, 21 Jun 2007 10:30:38 -0500, Len Morgan wrote:
> Is it possible to use either htmlText or rtfText to color the lines
> of a list? I have a list field where I'd like to have each line
> colored depending on the type of record it's displaying. If I can't
> set the font or background color using htmlText, what exactly CAN I
> use htmlText for?
You can set either or both... and you don't need to use htmlText or
rtfText if you don't want to - you can set the 'textColor' or
'backgroundColor' property of individual lines from script:
set the textColor of line 2 of field "MyListField" to red
But if you'd rather use HTML or RTF, be my guest:
put "<font color=" & quote & "red" & quote & "> & \
line 2 of field "MyListField" & "</font>" into tHTML
set the htmlText of line 2 of field "MyListField" to tHTML
HTH,
Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list