Tuesday, February 10, 2009

Flex - skinning the DateField icon

This blog has moved.

When adjusting the Date icon skin in a DateField component, its not sufficient to just use the css that Flex auto-generates when importing the Skin Artwork. In addition to 'skin', you must also specify that upSkin, overSkin, downSkin, disabledSkin are all set to null. otherwise they will supersede 'skin'. you do this for example, like so:


DateField {
skin: Embed(skinClass="DateField_skin");
upSkin: ClassReference(null);
overSkin: ClassReference(null);
downSkin: ClassReference(null);
disabledSkin: ClassReference(null);
}

2 comments:

s said...

Omg!!! Thank you so much. This has been driving me crazy and I looked everywhere for an answer about why simply

Button{
skin: Embed(skinClass="whatever");
}

wouldn't work. I finally found it. Thank you, thank you!

Craig Grummitt said...

glad it helped, s