1. #1
    Sencha Premium Member
    Join Date
    Jul 2011
    Posts
    18
    Answers
    1
    Vote Rating
    0
    jonas007 is on a distinguished road

      0  

    Default Answered: How to create a picker that displays a tree?

    Answered: How to create a picker that displays a tree?


    I want to create e special PickerField, that displays a tree.
    I assumed that the function createPicker must return only a tree (Ext.tree.View). But if I now click on the button of the picker, nothing happens. Does anybody advice how a picker can be built that will display a tree?
    Thank you

  2. You could maybe use this as a starting point:

    Code:
    Ext.create('Ext.form.field.Picker', {
        renderTo: Ext.getBody(),
    
        createPicker: function() {
            return Ext.create('Ext.tree.Panel', {
                floating: true,
                hidden: true,
                minHeight: 300,
                root: {
                    expanded: true,
                    text: 'Root',
                    children: [
                        {text: 'Child 1', children: []},
                        {text: 'Child 2', children: []},
                        {text: 'Child 3', children: []}
                    ]
                }
            });
        }
    });

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,688
    Answers
    3355
    Vote Rating
    749
    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


    Is the tree actually rendered in the DOM? What is happening?
    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.

  4. #3
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,338
    Answers
    498
    Vote Rating
    248
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    You could maybe use this as a starting point:

    Code:
    Ext.create('Ext.form.field.Picker', {
        renderTo: Ext.getBody(),
    
        createPicker: function() {
            return Ext.create('Ext.tree.Panel', {
                floating: true,
                hidden: true,
                minHeight: 300,
                root: {
                    expanded: true,
                    text: 'Root',
                    children: [
                        {text: 'Child 1', children: []},
                        {text: 'Child 2', children: []},
                        {text: 'Child 3', children: []}
                    ]
                }
            });
        }
    });

  5. #4
    Sencha Premium Member
    Join Date
    Jul 2011
    Posts
    18
    Answers
    1
    Vote Rating
    0
    jonas007 is on a distinguished road

      0  

    Default


    Thanks. The problem was to build the picker correctly. But now it works. If done properly, it is much easier than I thought before.

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar