Changing Text Color of Line in a Field

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
novarcproducts
Posts: 13
Joined: Fri Oct 05, 2007 12:45 am

Changing Text Color of Line in a Field

Post by novarcproducts » Thu Jan 29, 2009 4:05 am

Hi,
is it possible to script a line of text in a field to a different color than the rest of the field's text color? For instance if I wanted line 4 of the field to be Green colored text while leaving the rest of the text lines Blue or something else? I'm guessing not, but thought i'd ask.
Thank you,
Ron

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Thu Jan 29, 2009 6:25 am

You can set the foregroundColor property of a chunk in a field.

Code: Select all

set the foregroundColor of line 9 of field "foobar" to "red"
HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

novarcproducts
Posts: 13
Joined: Fri Oct 05, 2007 12:45 am

Post by novarcproducts » Thu Jan 29, 2009 7:06 am

That's what I needed!
Thank you!

Post Reply