Add style name to Canvas : Canvas « Components « Flex
- Flex
- Components
- Canvas
Add style name to Canvas

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Style>
.skinnedCanvas {
borderSkin: Embed("logo.png");
}
.starButton {
upSkin: Embed('logo.png');
overSkin: Embed('logo.png');
downSkin: Embed('logo.png');
disabledSkin: Embed('logo.png');
}
</mx:Style>
<mx:Canvas styleName="skinnedCanvas" width="200" height="200">
<mx:Button label="Button 1" width="125" horizontalCenter="0" verticalCenter="-30"/>
<mx:Button label="Button 2" width="125" horizontalCenter="0" verticalCenter="0"/>
<mx:Button label="Button 3" width="125" horizontalCenter="0" verticalCenter="30"/>
</mx:Canvas>
</mx:Application>
Related examples in the same category