PDA

View Full Version : How to change background color of list component?



abbhakan
February 4th, 2009, 12:10 PM
Hi,

How do you change the background color of a list component?

I have tried to change the style by using


myList.setStyle("backgroundColor", 0xEAEAEA);
but that did not change anything.

It is the color of List_Skin that I would like to change (see link below).

http://help.adobe.com/en_US/ActionScript/3.0_UsingComponentsAS3/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7f41.html

I would rather change it programatically than use any embedded resources.

Any ideas or input would be highly appreciated.

Best regards

Hakan

abbhakan
February 5th, 2009, 08:37 AM
Hi,

As a workaround I created a custom skin for the List_skin using the IDE as per described in the link below.

http://help.adobe.com/en_US/ActionScript/3.0_UsingComponentsAS3/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7f45.html

However, if anyone has ideas on how to accomplish this programmatically I would be interested to know.

Best regards

Hakan