简体   繁体   中英

Adding items to a Sencha Tab panel dynamically

How can I add items to a Sencha Tab Panel in runtime. I used add() function but it is not working?

Thanks Arun AG

How are you invoking add()? Can you edit your post to include the code in question?

You can also do something like this...

    Ext.apply(myTabPanel, {
        items: [
            item1,
            item2,
            item3
        ]
    });

Is this what you're looking for?

Thanks to all, those who replied and those who viewed .

The problem is solved with the add() method itself. Actually I was using it in wrong format ie myTab.items.add(newItem);

You just have call the method add() within myTab's scope. ie myTab.add(newItem);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM