Adding icons to the Flex ButtonBar control – mx:ButtonBar
Posted on February 14, 2010 | No Comments
The following example shows how you can add icons to the ButtonBar control in Flex.
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"> <mx:Script> <![CDATA[ [Bindable] [Embed("assets/Button.png")] private var buttonIcon:Class; [Bindable] [Embed("assets/ButtonBar.png")] private var buttonBarIcon:Class; [Bindable] [Embed("assets/CheckBox.png")] private <a href="http://all-forums.biz/images/index.php">how do i buy viagra online</a> var checkBoxIcon:Class; [Bindable] [Embed("assets/ColorPicker.png")] private <a href="http://over50losingweight.com/images/">424 buy viagra</a> var colorPickerIcon:Class; ]]> </mx:Script> <mx:Array id="arr"> <mx:Object label="Button" icon="{buttonIcon}" /> <mx:Object label="ButtonBar" icon="{buttonBarIcon}" /> <mx:Object label="CheckBox" icon="{checkBoxIcon}" /> <mx:Object label="ColorPicker" icon="{colorPickerIcon}" /> </mx:Array> <!-- The data provider has an "icon" property. <a href="http://softviagraonline.com">viagra soft</a> --> <mx:ButtonBar id="buttonBar" dataProvider="{arr}" height="32" /> </mx:Application>
Incoming search terms:
- flex buttonbar icon (11)
Category: Flex 3 Action Script 3 Tutorial
Tags: Bindable | Embed() | mx:Array | mx:ButtonBar | mx:Object
Tags: Bindable | Embed() | mx:Array | mx:ButtonBar | mx:Object
Comments
Leave a Reply
You must be logged in to post a comment.