tags:

views:

23

answers:

2

Hi All,

I need a custom Combobox in flex(as an ActionScript file), where I need to display in dropdown all the data nodes in the dataprovider as comma seperated values and when selecting only display one single node/value in textInput. How can we implemented this. Please help.

Thanks, Rejeev.

A: 
<mx:ComboBox id="fristname" x="283" y="63" 
    change="fistnameinput.text = fristname.text" width="160">
    <mx:ArrayCollection>
        <mx:String>Frist name</mx:String>
        <mx:String>Hardik</mx:String>
    </mx:ArrayCollection>
</mx:ComboBox>
Hardik Savani
A: 

With Flex 4 you can do this with a custom Layout object, probably a variation of the HorizontalLayout. To change the layout, create a new ComboBoxSkin copied from the default ComboBoxSkin and set the layout of the DataGroup. You'll probably also want to create a custom ItemRenderer too to display the label with a comma. Hope that helps.

Wade Mueller