| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <mx:Application backgroundColor="0xFFFFFF" backgroundImage="" xmlns:mx="http://www.adobe.com/2006/mxml" width="800" height="700" |
| xmlns:comps="comps.*" > |
| <mx:Script> |
| <![CDATA[ |
| |
| import mx.controls.TextInput; |
| import mx.controls.Label; |
| import mx.controls.Text; |
| import mx.events.ListEvent; |
| import mx.controls.dataGridClasses.*; |
| import mx.controls.listClasses.*; |
| |
| [Bindable] |
| public var contacts1:Array = [ |
| {Photo: 5}, {Photo: 6}, {Photo: 8}, {Photo: 10} |
| ]; |
| |
| public function doTest(event:ListEvent):void |
| { |
| event.preventDefault(); |
| |
| var myfocus:Object = {columnIndex:event.columnIndex, rowIndex:event.rowIndex}; |
| list_basic.editedItemPosition = myfocus; |
| list_basic.createItemEditor(event.columnIndex, event.rowIndex); |
| |
| if (list_basic.editedItemRenderer is IDropInListItemRenderer && list_basic.itemEditorInstance is IDropInListItemRenderer) |
| IDropInListItemRenderer(list_basic.itemEditorInstance).listData = IDropInListItemRenderer(list_basic.editedItemRenderer).listData; |
| |
| list_basic.itemEditorInstance.data = list_basic.editedItemRenderer.data; |
| |
| } |
| |
| public function finishEdit(event:ListEvent) : void |
| { |
| event.preventDefault(); |
| list_basic.destroyItemEditor(); |
| } |
| |
| public function changeLabel(obj:Object, col:Object):String |
| { |
| if(obj.Available) |
| { |
| return "Yes"; |
| } |
| else |
| { |
| return "No"; |
| } |
| } |
| |
| ]]> |
| </mx:Script> |
| |
| <mx:Style source="../../../../../Assets/Fonts/myStyles.css" /> |
| |
| <mx:List id="list_basic" dataProvider="{contacts1}" labelField="Photo" /> |
| |
| <mx:List id="list_11080" itemRenderer="comps.MoreInfoComp" variableRowHeight="true" height="200" width="250" > |
| <mx:dataProvider> |
| <mx:Array> |
| <mx:Object label="Alabama" data="Montgomery" webPage="http://www.alabama.gov/" expanded="false" |
| moreInfo="dkfjh dsfhj akds hjfdh lka flkahflkajdshflkja flk fdl dsf ldshf lhahd flahflkads hflkasd hflksa hflk hfdlkjsa hfdlkja hfdlka hflka " /> |
| <mx:Object label="Alaska" data="Juneau" webPage="http://www.state.ak.us/" expanded="false" |
| moreInfo="dkfjh dsfhj akds hjfdh lka flkahflkajdshflkja flk fdl dsf ldshf lhahd flahflkads hflkasd hflksa hflk hfdlkjsa hfdlkja hfdlka hflka " /> |
| <mx:Object label="Arkansas" data="Little Rock" webPage="http://www.state.ar.us/" expanded="false" |
| moreInfo="dkfjh dsfhj akds hjfdh lka flkahflkajdshflkja flk fdl dsf ldshf lhahd flahflkads hflkasd hflksa hflk hfdlkjsa hfdlkja hfdlka hflka " /> |
| </mx:Array> |
| </mx:dataProvider> |
| </mx:List> |
| |
| </mx:Application> |