1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    8
    Vote Rating
    0
    alex007 is on a distinguished road

      0  

    Question Unanswered: How to create combobox like component but with tree inside the list

    Unanswered: How to create combobox like component but with tree inside the list


    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

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,632
    Answers
    3452
    Vote Rating
    817
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    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.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,506
    Answers
    528
    Vote Rating
    287
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    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.

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,632
    Answers
    3452
    Vote Rating
    817
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by skirtle View Post
    crux
    Vote for word of the day! Well, what's left of it.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,506
    Answers
    528
    Vote Rating
    287
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    There's plenty more highfalutin pomposity where that came from...

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

  6. #6
    Sencha User
    Join Date
    Apr 2011
    Posts
    8
    Vote Rating
    0
    alex007 is on a distinguished road

      0  

    Default


    Thanks. Yes. I was trying to extend the ComboBox. May be it will be better just to extend directly Picker

Thread Participants: 2