Use the DropDownList spark control for the choice editors
authorAndy Allan <andy@gravitystorm.co.uk>
Thu, 15 Sep 2011 16:22:33 +0000 (17:22 +0100)
committerAndy Allan <andy@gravitystorm.co.uk>
Thu, 15 Sep 2011 16:22:33 +0000 (17:22 +0100)
net/systemeD/potlatch2/mapfeatures/editors/ChoiceEditor.mxml

index 9198211..b41576f 100644 (file)
@@ -2,23 +2,23 @@
 <edit:SingleTagEditor
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:mx="library://ns.adobe.com/flex/mx"
+       xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:edit="net.systemeD.potlatch2.mapfeatures.editors.*"
        toolTip="{fieldDescription}"
     direction="{fieldDirection}" styleName="titledEditor">
 
   <mx:Label text="{fieldName}:"/>
-  <edit:ChoiceComboBox id="inputBox" dataProvider="{choices}" selectedItem="{selectFromTag}" rowCount="15"
-      change="value = inputBox.selectedItem.value"
-      open="inputBox.dropdown.variableRowHeight = true">
-      <edit:itemRenderer>
+  <s:DropDownList id="inputBox" dataProvider="{choices}" selectedItem="{selectFromTag}"
+      change="value = inputBox.selectedItem.value" labelField="label">
+      <s:itemRenderer>
         <fx:Component>
         <mx:HBox toolTip="{data.description}" horizontalScrollPolicy="off">
           <mx:Image source="{Choice(data).icon}"/>
           <mx:Label htmlText="{data.label}"/>
         </mx:HBox>
         </fx:Component>
-      </edit:itemRenderer>
-  </edit:ChoiceComboBox>
+      </s:itemRenderer>
+  </s:DropDownList>
 
   <fx:Script><![CDATA[
       import mx.collections.*;