Re: [flexcoders] Keep combobox open to allow multiselect
I am still not clear on how this can be done. I must use a combobox (this is a must-have for me). This is what I attempted... can you please give some pointers based on my code below? ?xml version=1.0 encoding=utf-8? mx:ComboBox xmlns:mx=http://www.adobe.com/2006/mxml; change=close() mx:Script ![CDATA[ override public function close(trigger:Event = null):void { //Do nothing } ]] /mx:Script mx:dropdownFactory mx:Component mx:List mx:itemRenderer mx:Component mx:CheckBox selectedField=isSelected click=onChange(event); mx:Script ![CDATA[ private function onChange(evt:Event):void { data.isSelected = !data.isSelected; } ]] /mx:Script /mx:CheckBox /mx:Component /mx:itemRenderer /mx:List /mx:Component /mx:dropdownFactory /mx:ComboBox Thanks Ram -- rviswanathan wrote: Hi I have created a combo box with a checkbox renderer on each of its items. When I select an entry in the combobox, the box closes automatically. I want to prevent his so that I can multiselect elements in the combobox. Is there a way to do this? Even if I extend the ComboBox and override its close method, the combobox still closes (and I realized that there is a private method in ComboBox.as called destroyDropdown() which gets called when the collection that the combobox holds changes. Thanks Ram -- View this message in context: http://www.nabble.com/Keep-combobox-open-to-allow-multiselect-tp17644507p17666884.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] Keep combobox open to allow multiselect
Ram, The component you are trying to create shouldn´t exetend the combobox for two reasons, first you would have to override a lot of the combobox methods and second (and for me the most important) you would break the common sense of how a combobox should behave for example if it doesn´t close when you select an item when it closes? What you are going to show when the user select five items? If I where you I would make that componente based in the canvas or the vbox container and give it a diferent look form the combobox (after all as I said the feel is alredy diferent), you could use a label and a button (for the closed look) and a list with checkboxes itemEditors (for the opened look) Felipe On Thu, Jun 5, 2008 at 7:31 AM, rviswanathan [EMAIL PROTECTED] wrote: I am still not clear on how this can be done. I must use a combobox (this is a must-have for me). This is what I attempted... can you please give some pointers based on my code below? ?xml version=1.0 encoding=utf-8? mx:ComboBox xmlns:mx=http://www.adobe.com/2006/mxml; change=close() mx:Script ![CDATA[ override public function close(trigger:Event = null):void { //Do nothing } ]] /mx:Script mx:dropdownFactory mx:Component mx:List mx:itemRenderer mx:Component mx:CheckBox selectedField=isSelected click=onChange(event); mx:Script ![CDATA[ private function onChange(evt:Event):void { data.isSelected = !data.isSelected; } ]] /mx:Script /mx:CheckBox /mx:Component /mx:itemRenderer /mx:List /mx:Component /mx:dropdownFactory /mx:ComboBox Thanks Ram -- rviswanathan wrote: Hi I have created a combo box with a checkbox renderer on each of its items. When I select an entry in the combobox, the box closes automatically. I want to prevent his so that I can multiselect elements in the combobox. Is there a way to do this? Even if I extend the ComboBox and override its close method, the combobox still closes (and I realized that there is a private method in ComboBox.as called destroyDropdown() which gets called when the collection that the combobox holds changes. Thanks Ram -- View this message in context: http://www.nabble.com/Keep-combobox-open-to-allow-multiselect-tp17644507p17666884.html Sent from the FlexCoders mailing list archive at Nabble.com. -- Felipe - http://bobfernandes.wordpress.com
[flexcoders] Keep combobox open to allow multiselect
Hi I have created a combo box with a checkbox renderer on each of its items. When I select an entry in the combobox, the box closes automatically. I want to prevent his so that I can multiselect elements in the combobox. Is there a way to do this? Even if I extend the ComboBox and override its close method, the combobox still closes (and I realized that there is a private method in ComboBox.as called destroyDropdown() which gets called when the collection that the combobox holds changes. Thanks Ram -- View this message in context: http://www.nabble.com/Keep-combobox-open-to-allow-multiselect-tp17644507p17644507.html Sent from the FlexCoders mailing list archive at Nabble.com.
RE: [flexcoders] Keep combobox open to allow multiselect
I'd just use a button and a Popup list From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of rviswanathan Sent: Wednesday, June 04, 2008 4:28 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Keep combobox open to allow multiselect Hi I have created a combo box with a checkbox renderer on each of its items. When I select an entry in the combobox, the box closes automatically. I want to prevent his so that I can multiselect elements in the combobox. Is there a way to do this? Even if I extend the ComboBox and override its close method, the combobox still closes (and I realized that there is a private method in ComboBox.as called destroyDropdown() which gets called when the collection that the combobox holds changes. Thanks Ram -- View this message in context: http://www.nabble.com/Keep-combobox-open-to-allow-multiselect-tp17644507 p17644507.html http://www.nabble.com/Keep-combobox-open-to-allow-multiselect-tp1764450 7p17644507.html Sent from the FlexCoders mailing list archive at Nabble.com.