开发者

Custom combobox in flex

开发者 https://www.devze.com 2023-01-14 02:04 出处:网络
I need a custom Combobox in flex(as an ActionScript file), where I need to display in dropdown all the dat开发者_StackOverflow中文版a nodes in the dataprovider as comma seperated values and when selec

I need a custom Combobox in flex(as an ActionScript file), where I need to display in dropdown all the dat开发者_StackOverflow中文版a 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.


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.


<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>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号