Skip to main content

Posts

Showing posts from July, 2012

Applying Fonts to Data Grid in Flex 4.6

To Apply custom fonts in Flex datagrid, 1. import the font in fonts folder. 2. Write a css and include the font as font face. 3. Include font family in datagrid and include the font family name. Code snippet font.css /* CSS file */ @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; @namespace local "*"; @font-face { src:url("/../fonts/James.ttf"); fontFamily:james; embedAsCFF: true; } Main MXML  <?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"> <fx:Style source="font.css"/> <fx:Script> <![CDATA[ import mx.controls.Alert; protected function datagrid1_clickHandler(event:Mou...