tags:

views:

21

answers:

1

Is there a way to declare a skin inline in a Flex 4 MXML Component? If not inline in the component then in the declarations or library tag? Thx

+2  A: 

Use the skinClass style.

In MXML, like this:

<s:List skinClass="com.myCustomSkins.MyCustomListSkin" />

In ActionScript, do something like this:

 myListClass.setStyle('skinClass',com.myCustomSkins.MyCustomListSkin);

In CSS, do something like this:

myListClass{
 skinClass : ClassReference(com.myCustomSkins.MyCustomListSkin);
}

I'm not sure what a library tag is that you refer to in your question. This code is from memory, so my syntax may be a bit off.

www.Flextras.com