Save info   Get password
Home Submit your blog Edit Account Rules RSS-Archive Contact


Changing live dragging on a TileList control in Flex
2008-03-16 10:45:32
The following example shows how you can enable or disable live dragging on a Flex TileList control by setting the liveDragging property. Full code after the jump. <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="" layout="vertical" verticalAlign="middle" backgroundColor="white"> <mx:ArrayCollection id="arrColl"> <mx:source> <mx:Array> <mx:Object label="ColdFusion" icon="@Embed('assets/cf_appicon-tn.gif')" /> <mx:Object label="Dreamweaver" icon="@Embed('assets/dw_appicon-tn.gif')" /> <mx:Object label="Fireworks" icon="@Embed('assets/fw_appicon-tn.gif')" /> <mx:Object label="Flash" icon="@Embed('assets/fl_appicon-tn.gif')" /> <mx:Object label="Flash Player" icon="@Embed('assets/fl_player_appicon-tn.gif
Read more: Changing

Setting the child layout direction of a Flex Panel container
2008-03-24 13:07:24
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="" layout ="vertical" verticalAlign="middle" backgroundColor="white"> <mx:Array id="arr"> <mx:Object label="horizontal" /> <mx:Object label="vertical" /> </mx:Array> <mx:ApplicationControlBar dock="true"> <mx:Form styleName="plain"> <mx:FormItem label="layout:"> <mx:ToggleButtonBar id="toggleButtonBar" dataProvider="{arr}" selectedIndex="1" itemClick="panel.layout = event.label;" /> </mx:FormItem> </mx:Form> </mx:ApplicationControlBar> <mx:Panel id="panel" status="{panel.layout}" width="320" height="160"> <mx:Label text="Button" /> <mx:Label text="ButtonBar" /> <mx:Label text="CheckBox" /> <mx:Label text="ColorPicker
Read more: Setting , child

Setting the selected index of a Flex LinkBar control
2008-03-24 13:06:06
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="" layout="vertical" verticalAlign="middle" backgroundColor="white"> <mx:Array id="arr"> <mx:Object label="One" /> <mx:Object label="Two" /> <mx:Object label="Three" /> <mx:Object label="Four" /> </mx:Array> <mx:ApplicationControlBar dock="true"> <mx:Form styleName="plain"> <mx:FormItem label="selectedIndex:"> <mx:HSlider id="slider" minimum="0" maximum="{linkBar.dataProvider.length - 1}" liveDragging="true" snapInterval="1" tickInterval="1" dataTipPrecision="0" /> </mx:FormItem> </mx:Form> </mx:ApplicationControlBar> <mx:LinkBar id="linkBar" dataProvider="{arr}" selectedIndex="{slider.value}" /> </mx:Application>
Read more: Setting

Setting the background color and background alpha on a Flex LinkBar control
2008-03-24 13:00:32
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="" layout="vertical" verticalAlign="middle" background Color="white"> <mx:Array id="arr"> <mx:Object label="One" /> <mx:Object label="Two" /> <mx:Object label="Three" /> <mx:Object label="Four" /> </mx:Array> <mx:ApplicationControlBar dock="true"> <mx:Form styleName="plain"> <mx:FormItem label="backgroundAlpha:"> <mx:HSlider id="slider" minimum="0.0" maximum="1.0" value="1.0" liveDragging="true" /> </mx:FormItem> </mx:Form> </mx:ApplicationControlBar> <mx:LinkBar id="linkBar" dataProvider="{arr}" backgroundAlpha="{slider.value}" backgroundColor="haloBlue" /> </mx:Application>
Read more: Setting

Setting alternating item colors on a Flex PopUpButton control
2008-03-24 12:59:17
<?xml version="1.0"?> <mx:Application xmlns:mx="" layout="horizontal" verticalAlign="top" backgroundColor="white"> <mx:Script> <![CDATA[ import mx.controls.Menu; [Bindable] private var menu:Menu; private function initMenu():void { menu = new Menu(); menu.dataProvider = arr; } ]]> </mx:Script> <mx:Array id="arr"> <mx:Object label="Button" /> <mx:Object label="ButtonBar" /> <mx:Object label="ColorPicker" /> <mx:Object label="ComboBox" /> </mx:Array> <mx:Style> PopUpButton { popUpStyleName: myCustomPopUpStyleName; } .myCustomPopUpStyleName { fontWeight: normal; textAlign: left; alternating ItemColors: white, #EEEEEE; } </mx:Style> <mx:PopUpButton id="popUpButton" label="Select a control..." popUp="{menu}"
Read more: Setting

Removing folder icons from the Flex Tree control
2008-03-24 12:57:25
<mx:Style> Tree { folderClosedIcon: ClassReference(null); folderOpenIcon: ClassReference(null); } </mx:Style> The long answer? Full code after the jump. <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="" layout="vertical" verticalAlign="middle" backgroundColor="white"> <mx:XML id="dp"> <mlb> <league label="American League"> <division label="East"> <team label="Boston" /> <team label="New York" /> <team label="Toronto" /> <team label="Baltimore" /> <team label="Tampa Bay" /> </division> <division label="Central"> <team label="Cleveland" /> <team label="Detroit" /> <team label="Minnesota" /> <team label="Chicago" /> <team label="


Scrolling a Flex List control horizontally
2008-03-24 12:54:30
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="" layout="vertical" verticalAlign="middle" backgroundColor="white"> <mx:XML id="xmlDP"> <root> <node>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</node> <node>Donec sit amet dui nec pede aliquam auctor.</node> <node>Integer vestibulum sodales dui.</node> <node>Sed nonummy ligula et tortor.</node> <node>Aenean varius neque vel felis.</node> <node>Phasellus venenatis ipsum sit amet nisi.</node> <node>Nullam vitae turpis et ipsum cursus venenatis.</node> <node>Pellentesque tincidunt pede non arcu.</node> <node>Aliquam ut massa quis ante dignissim egestas.</node> <node>Cura
Read more: Scrolling

Creating a tool tip on a Flex TextInput control with password masked text
2008-03-24 12:53:07
<mx:TextInput id="ccNumber" text="4111111111111111" displayAsPassword="true" toolTip="{ccNumber.text}" /> <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="" layout="vertical" verticalAlign="middle" backgroundColor="white"> <mx:Script> <![CDATA[ import mx.formatters.DateBase; ]]> </mx:Script> <mx:Form> <mx:FormItem label="Name:"> <mx:TextInput id="ccName" text="JOHN DOE" /> </mx:FormItem> <mx:FormItem label="Number:"> <mx:TextInput id="ccNumber" text="4111111111111111" displayAsPassword="true" toolTip="{ccNumber.text}" /> </mx:FormItem> <mx:FormItem label="Type:"> <mx:ComboBox id="ccType" dataProvider="[American Express,MasterCard,Visa]" /> </mx:FormItem> <mx:F
Read more: Creating

Creating semi-transparent PopUpButton pop up menus in Flex
2008-03-24 12:50:47
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="" layout="vertical" verticalAlign="top" backgroundColor="white"> <mx:Style> PopUpButton { popUpStyleName: myCustomPopUpStyleName; } .myCustomPopUpStyleName { fontWeight: normal; textAlign: left; backgroundAlpha: 0.4; backgroundColor: white; borderStyle: solid; } </mx:Style> <mx:Script> <![CDATA[ import mx.controls.Menu; private var menu:Menu; private function init():void { menu = new Menu(); menu.labelField = "@label"; menu.dataProvider = xmlList; popUpButton.popUp = menu; menu.width = popUpButton.width; } ]]> </mx:Script> <mx:XMLList id="xmlList"> <node label="Alert" /> <node label="Button" /> <node label="ButtonBar" /> <node label="CheckBox" />
Read more: Creating

Adding checkboxes, radiobuttons, and sub-menus to a Flex PopUpButton control’s pop up menu
2008-03-24 12:49:26
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="" layout="vertical" verticalAlign="top" backgroundColor="white"> <mx:Style> PopUpButton { popUpStyleName: myCustomPopUpStyleName; } .myCustomPopUpStyleName { fontWeight: normal; textAlign: left; } </mx:Style> <mx:XML id="xmlDP"> <root> <node label="The quick brown fox jumped over the lazy dog." /> <node label="Lorem ipsum (disabled)." enabled="false" /> <node type="separator" /> <node label="parent"> <node label="child1" /> </node> <node label="parent (disabled)" enabled="false"> <node label="child1" /> <node label="child2" /> <node label="child3" /> </node> <node type="separator" /> <node label="type=check" i


Setting the corner radius on a Flex PopUpButton control
2008-03-24 12:46:24
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="" layout="vertical" verticalAlign="top" backgroundColor="white"> <mx:Style> PopUpButton { popUpStyleName: myCustomPopUpStyleName; } .myCustomPopUpStyleName { fontWeight: normal; textAlign: left; leftIconGap: 0; } </mx:Style> <mx:Script> <![CDATA[ import mx.controls.Menu; private function init():void { var menu:Menu = new Menu(); menu.dataProvider = arr; popUpButton.popUp = menu; } private function resizePopUp():void { popUpButton.popUp.width = popUpButton.width; } ]]> </mx:Script> <mx:Array id="arr"> <mx:Object label="Alert" /> <mx:Object label="Button" /> <mx:Object label="ButtonBar" /> <mx:Object type="separator" /> <mx:Object label="CheckBox
Read more: Setting , corner

Page 2 of 2 « < 1 2 > »
eXTReMe Tracker