Share on Google+Share on Google+

Inline style in Flex4

Advertisement
When you can set the properties of components in its own tag called a inline style sheet.

Inline style in Flex4:

When you can set the properties of components in its own tag called a inline style sheet. In this example you can see how we can use a inline style sheet in our application.

Example:

<?xml version="1.0" encoding="utf-8"?>

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

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

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

minWidth="955" minHeight="600">

<s:Panel title="Inline Style Example" width="348" height="182">

<!-- Using Inline style -->

<s:Button id="btn"

label="Submit"

styleName="button"

x="125" y="20"

cornerRadius="20"

width="95"

height="24"

color="#066167"

fontFamily="verdana"

fontSize="16"

fontWeight="bold"

chromeColor="#93B4AE"

focusColor="#120777"/>

<s:Label text="This is a Inline style example."

x="11" y="77"

styleName="label"

fontSize="18"

fontFamily="verdana"

backgroundColor="#E79595"

color="#6A3737"

height="45"

width="325"

textAlign="center"

verticalAlign="middle"/>

</s:Panel>

</s:Application>

Output:

Running Application:

To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.

Download this code

Advertisements

Posted on: June 21, 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.