ItemClick Event in a flex Combobox?

As you can see in mx:ComboBox sources, the function, creating the dropdown list, is private, the listener to ITEM_CLICK is private and the list itself is also private.

As you can see in mx:ComboBox sources, the function, creating the dropdown list, is private, the listener to ITEM_CLICK is private and the list itself is also private: private var _dropdown:ListBase; private function getDropdown():ListBase { // ... _dropdown = dropdownFactory.newInstance(); // ... _dropdown. AddEventListener(ListEvent. ITEM_CLICK, dropdown_itemClickHandler); // .... } private function dropdown_itemClickHandler(event:ListEvent):void { if (_showingDropdown) { close(); } } So you can not even extend ComboBox.

The only public thing is dropdownFactory, which theoretically can be overriden to somehow register the created dropdown list or create extended list. But the problem I see is that ComboBox is not the parent of dropdown list - PopupManager is. This can make dispatching (bubble) events quite difficult.

Hmmm .. true, quite difficult. What if, say, have 2 components: ComboBox and List. Set the dropdownWidth of the Combo to 0.

Place the List under it. And when user somehow tries to open a combo, show a List control (instead of dropDown). I just have doubts on .. is it dirty solution?

I saw such thing in one of AutoComplete components. – Antenka Sep 1 at 11:39 IMHO, it's easier is to write own ComboBox with everything you need (ѝ блѝкджеком и шлюхами), which is partially copypasted from original. I've already written the editable one with filters and tree as dropdown - and I can't imagine, how I would patch and hack origonal ComboBox in order to achieve desired behavior.

– moropus Sep 1 at 11:52 Heh, true .. thanks for the explanations (доходчиво :Ð ). Failed with avoiding the customization .. off to write my Combo-Masterpiece :) – Antenka Sep 1 at 12:08 You're welcome! – moropus Sep 1 at 12:10.

I think the following document will be helpful ItemClick event in flex List.

– Antenka Sep 1 at 9:58 1 The dropdown in ComboBox is already a List: private var _dropdownFactory:IFactory = new ClassFactory(List); – moropus Sep 1 at 10:36 @Antenka What moropus saying is correct the combobox, dropdown are extended from the listbase only. Try that for the combo I think it will work. – Sudharsanan Sep 1 at 11:11.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions