Results 1 to 6 of 6

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

  1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    8
    Vote Rating
    0
      0  

    Question 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 User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Answers
    3976
    Vote Rating
    1381
      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 @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    584
    Vote Rating
    392
      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 User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Answers
    3976
    Vote Rating
    1381
      0  

    Default

    Quote Originally Posted by skirtle View Post
    crux
    Vote for word of the day! Well, what's left of it.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  5. #5
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    584
    Vote Rating
    392
      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
      0  

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •