My problem is that writing a whole custom component is too involved for the few time I have and your method seems to work quite well.
The only trouble I have (as described in my previous reply) is that the ComboBox should fire a change event everytime an item is selected while it stays opened. By default the ComboBox is only firing this event after it closes. However listening to the dropdown (the List component in the ComboBox) property's ListEvent.CHANGE seems not to cut it. It would be great if you would have a workaorund for this! Best, Sascha From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Ben Reynolds Sent: Thursday, April 16, 2009 14:23 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Making ComboBox stay open after item select? I'm by no means on Alex's level of Flex knowledge, but a Button combined with a Menu component would work too. You wouldn't get into resizing issues and you'd still be able to do styling without resorting to UIComponent first principles. :) --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Sascha" <sbal...@...> wrote: > > I've made a short test and that seems to work so far. Thanks for the hint > Ben! > > I almost started to try writing a custom component from a Button and a List > wrapped into a UIComponent as Alex Harui suggested in a message I've found > but seems that that's not necessary. > > > > Sascha > > > > > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of Ben Reynolds > Sent: Thursday, April 16, 2009 10:34 > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] Re: Making ComboBox stay open after item select? > > > > > > > > > Something like: > > package > { > import flash.events.Event; > import mx.controls.ComboBox; > > public class ComboBoxNoClose extends ComboBox > { > public function ComboBoxNoClose() > { > super(); > } > > public override function close(trigger:Event = null):void > { > if (trigger != null) > super.close(); > > > } > } > } > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Sascha" <sbalkau@> wrote: > > > > Does anyone know how to modify the ComboBox so that it stays open after > > selecting an item? > > > > I need such a ComboBox for a client that opens/closes only if the user > > clicks on the 'header area' of the ComboBox or that closes only if clicked > > outside the ComboBox. > > > > The use case for this is that the ComboBox will have custom item renderers > > that contain (for example) a CheckBox and a Label and the user should be > > able to make several selections without the ComboBox closing inbetween. > > > > I've made this before by wrapping all the stuff into a Panel and changing > > the Panels height on close so that only the header is visible but that > > method is rather suboptimal, especially for skinning. > > > > Would be great if somebody has a workaround for this! > > Thanks in advance! > > > > Sascha >