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.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.
<?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> </s:Panel> </s:Application> |
To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.