Home Tutorial Flex Flex4 Components Style in Flex4

 
 

Style in Flex4
Posted on: June 1, 2010 at 12:00 AM
Style is a process to change the look and feel for single component or apply them all component in your application.

Style in Flex4:-

Style is a process to change the look and feel for single component or apply them all component in your application. If user want to change the appearance then it is used style properties for a single component or group of components or all components in the application. Here is a example that hold the process to apply simple style for the component. User can set the style properties depends on the components architecture.

In this example user can see how to apply a simple style for a component. This example includes Label component.

Example:-

<?xml version="1.0"?>

<s:Application

xmlns:fx="http://ns.adobe.com/mxml/2009"

xmlns:mx="library://ns.adobe.com/flex/mx"

xmlns:s="library://ns.adobe.com/flex/spark">

<s:VGroup>

<s:Label id="myLabel"

text="This is Spark label component"

fontSize="15"

fontWeight="bold"

fontStyle="italic"

color="0x00CCFF"/>

</s:VGroup>

</s:Application>

In this example we have create a label component and set the style properties like "fontSize", "fontWeight", "fontStyle", "color" properties.

Output:-

This is the general way to apply style for a component.

Download this code

Related Tags for Style in Flex4:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.