Mega Code Archive

 
Categories / Flex / Graphics
 

Fonts are inheritable style properties

<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">     <mx:Style>         @namespace mx "http://www.adobe.com/2006/mxml";         mx|VBox {              fontFamily: Helvetica;              fontSize: 18pt;          }          mx|HBox {              fontFamily: Times;              fontSize: 18pt;          }     </mx:Style>     <mx:Panel title="Styles Inherited from VBox Type Selector">         <mx:VBox>             <mx:Button label="Helvetica" />             <mx:Label text="Helvetica" />             <mx:TextArea width="400" height="75" text="Helvetica inherited from VBox" />         </mx:VBox>     </mx:Panel>     <mx:Panel title="Styles Inherited from HBox">         <mx:HBox>             <mx:Button label="Helvetica" />             <mx:Label text="Helvetica" />             <mx:TextArea width="400" height="75" text="Times inherited from HBox style." />         </mx:HBox>     </mx:Panel> </mx:Application>