PDA

View Full Version : Font Color Of Label In A List Item


gouravk
12-28-2005, 05:04 AM
Hello
I wanted to know how to programmatically set the font color of a label of a specific list item.

I tried to use setPropertiesAt() but I could only set the background color, not the font color of the text.

Any help would be appreciated.

Thanks
Gaurav

Headshotz
12-28-2005, 05:42 AM
varname.textColor(0xFF0000);

gouravk
12-28-2005, 05:59 AM
textColor is not working. I tried the following

list.setPropertiesAt(index, {textColor: 0x0000FF}); but it is not working.

0x0000FF = blue.

Thanks
Gourav

Headshotz
12-28-2005, 10:31 AM
Sorry I was being lazy :rolleyes:

This is a sample I made for text color, you can modify this. If you want more indepth help please post your code (with tags on)


headshotz = new TextFormat();
headshotz.color = 0x0000FF;
_root.createTextField("headshotzfield", 0, 0, 0, 200, 150);
headshotzfield.setNewTextFormat(headshotz);
headshotzfield.text = "This is blue text";