- <mx:Label text="{fieldName}:"/>
- <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="{getStyledLabel(Choice(data))}"/>
- <fx:Script><![CDATA[
- public function getStyledLabel(choice:Choice):String {
- if (choice.value==null) return "<font color='#a0a0a0'><i>"+choice.label+"</i></font>";
- return choice.label;
- }
- ]]></fx:Script>
- </mx:HBox>
- </fx:Component>
- </s:itemRenderer>
- </s:DropDownList>
+ <s:FormItem label="{fieldName}">
+ <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="{getStyledLabel(Choice(data))}"/>
+ <fx:Script><![CDATA[
+ public function getStyledLabel(choice:Choice):String {
+ if (choice.value==null) return "<font color='#a0a0a0'><i>"+choice.label+"</i></font>";
+ return choice.label;
+ }
+ ]]></fx:Script>
+ </mx:HBox>
+ </fx:Component>
+ </s:itemRenderer>
+ </s:DropDownList>
+ </s:FormItem>