Font in Flex4


 

Font in Flex4

In this example you can see how we can use font in a flex application.

In this example you can see how we can use font in a flex application.

Font in Flex4:

In this example you can see how we can use font in a flex application. You will use font for the appearance of the component. You will use font for give a color , size and etc.

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">

<!-- using fonts -->

<fx:Style>

@namespace s "library://ns.adobe.com/flex/spark";

@namespace mx "library://ns.adobe.com/flex/mx";

s|VGroup{

font-family:Helvetica;

font-size:18px;

color:#808080;

}

s|HGroup{

font-family:Verdana;

font-size:14px;

color:#990000;

}

</fx:Style>

<s:Panel title="Font Example" width="268" height="145">

<s:VGroup x="15" y="13" width="189" height="48">

<s:Button label="Submit"/>

<s:Label text="This is a Helvetica font."/>

</s:VGroup>

<s:HGroup x="14" y="75">

<s:Button label="Submit"/>

<s:Label text="This is a Verdana font."/>

</s:HGroup>

0

</s:Panel>

</s:Application>

Output:

1

Running Application:

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

Download this code

2

Ads