<?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"> <s:layout> <s:VerticalLayout/> </s:layout> <fx:Script> <![CDATA[ // Add data item, and button, to the List. private function addFlexToDP():void { myBB.dataProvider.addItem("Flex"); addFlex.enabled=false; // how to select or focus to new item created } ]]> </fx:Script> <s:List id="myBB"> <mx:ArrayCollection> <fx:String>Flash</fx:String> <fx:String>Director</fx:String> <fx:String>Dreamweaver</fx:String> <fx:String>ColdFusion</fx:String> </mx:ArrayCollection> </s:List> <s:Button id="addFlex" label="Add Flex" click="addFlexToDP();"/> </s:Application>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)