Thanks, so this script would go within the 

<mx:ComboBox...>

</mx:ComboBox>

Right?


Manish Jethani wrote:
> 
> On Fri, Jan 2, 2009 at 3:59 AM, Mike Oliver <[email protected]>
> wrote:
> 
>> it looks to me like it is better to use a label function to render the
>> display value and leave the combo box for itemEditor.
>>
>> That still leaves the question on how the ComboBox will display the
>> Option
>> Label when in edit mode.
> 
> The ComboBox won't select the item based on the value of the 'text'
> property, so you'll have to do the selection for it, by overriding the
> data setter.
> 
>   override public function set data(value:Object):void
>     {
>       super.data = value;
> 
>       var listCursor:IViewCursor = collection.createCursor();
>       do
>       {
>         if (data.med_route_oidCol == listCursor.current.text)
>         {
>           selectedItem = listCursor.current;
>           break;
>         }
>       }
>       while (listCursor.moveNext());
>   }
> 
> Manish
> 
> 

-- 
View this message in context: 
http://www.nabble.com/itemRenderer-ComboBox-tp21243094p21246607.html
Sent from the FlexCoders mailing list archive at Nabble.com.

Reply via email to