View Full Version : How to create combobox like component but with tree inside the list

21 Dec 2011, 9:05 AM
I need to create component like combobox but instead of plain list there should be tree. I tried to implement it by modifying Ext.form.field.ComboBox but I was lost while creating picker.

Is there simple way to create this type of control? I don't need validation, showing selected value inside the tree and so on.
I just need only edit box with button. By pressing on this button the picker appear with tree we select something and the value inserted to the edit box. I can't use separate window for tree, because in this case the editbox loses the focus and property grid destroys the editor

21 Dec 2011, 3:21 PM
createPicker in the ComboBox is where you should create a floating tree panel. Then you need to add some listeners to the tree that when you select/check a node, it updates the combobox's value and the other way around that you need to select/check the appropriate nodes based on the combobox's value.

21 Dec 2011, 3:56 PM
You may also want to investigate extending Ext.form.field.Picker directly rather than extending ComboBox. The technique Mitchell described would still be the crux of it.

21 Dec 2011, 4:02 PM

Vote for word of the day! Well, what's left of it.

21 Dec 2011, 4:16 PM
There's plenty more highfalutin pomposity where that came from...

... or to be grammatically accurate, 'whence that came'. ;)

22 Dec 2011, 12:30 AM
Thanks. Yes. I was trying to extend the ComboBox. May be it will be better just to extend directly Picker