Home Tutorial Flex Flex4 Components Style in Flex4

 
 

Share on Google+Share on Google+
Style in Flex4
Posted on: June 1, 2010 at 12:00 AM
Advertisement
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

Advertisement

Related Tags for Style in Flex4:


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.

Posted on: June 1, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com