Share on Google+Share on Google+

Flex Style Manager

In this tutorial, user can see how to use Style Manager for implement style in flex application.

StyleManager in Flex:-

In this tutorial, user can see how to use Style Manager for implement style in flex application. First, we discuss what is StyleManager in flex?. The class mx.styles.StyleManager define the StyleManager which manage all styles on all components instance. The StyleManager main task are manage style for each component instance. In this example StyleManager are use two methods that's getStyleDeclaration() and setStyle() to set Style for flex components. The getStyleDeclaration() method are use to to find out the graphical component and setStyle() method are use to set Style for the flex components. for example,

<?xml version="1.0"?>

<mx:Application xmlns:mx="" creationComplete="initApp()">


import mx.skins.Border;

import mx.styles.StyleManager;

public function initApp():void {











<mx:LinkButton id="myLinkButton" label="This is my Link Button."/>

<mx:Button id="myButton" label="This is my Button."/>

<mx:Image id="img" source="@Embed(source='assets/flower.jpeg')"/>





Posted on: April 3, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.