生活在开发者的领域, 就要日新月异的发展

 

自定义ItemRenderer在COMBOBOX中的例子

 

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">

<mx:XMLList id="employees">

<employee>

<name>Christina Coenraets</name>

<phone>555-219-2270</phone>

<email>ccoenraets@fictitious.com</email>

<active>false</active>

</employee>

<employee>

<name>Joanne Wall</name>

<phone>555-219-2012</phone>

<email>jwall@fictitious.com</email>

<active>true</active>

</employee>

<employee>

<name>Maurice Smith</name>

<phone>555-219-2012</phone>

<email>maurice@fictitious.com</email>

<active>false</active>

</employee>

<employee>

<name>Mary Jones</name>

<phone>555-219-2000</phone>

<email>mjones@fictitious.com</email>

<active>true</active>

</employee>

</mx:XMLList>

<mx:ComboBox dataProvider="{employees}" width="252" labelField="name" horizontalCenter="0">

<mx:itemRenderer>

<mx:Component>

<mx:Form width="250" height="110">

<mx:CheckBox selected="{data.active}"/>

<mx:FormItem label="Name:">

<mx:Label text="{data.name}"/>

</mx:FormItem>

<mx:FormItem label="Phone:">

<mx:Label text="{data.phone}"/>

</mx:FormItem>

<mx:FormItem label="EMail:">

<mx:Label text="{data.email}"/>

</mx:FormItem>

<mx:HRule width="100%"/>

</mx:Form>

</mx:Component>

</mx:itemRenderer>

</mx:ComboBox>

</mx:Application>

 

posted on 2010-12-15 14:37  施大爷  阅读(191)  评论(0)    收藏  举报

导航