Results 1 to 4 of 4

Thread: Adding items to a Sencha Tab panel dynamically

  1. #1
    Sencha User
    Join Date
    Jun 2011
    Location
    Kochi, Kerala, India
    Posts
    8
    Answers
    1

    Default Answered: 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 A G

  2. You can:
    mypanel.add(mycomponent1);
    mypanel.add(mycomponent2);
    mypanel.add(mycomponent3);

    mypanel.doLayout(); // important


    Notes: mypanel must has its layout.

  3. #2

    Default Adding panel

    Calling setActiveItem() should do the trick. If you want to do the add() make sure you call doLayout() after or it won't render.

    Bob

  4. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    27
    Answers
    1

    Default

    You can:
    mypanel.add(mycomponent1);
    mypanel.add(mycomponent2);
    mypanel.add(mycomponent3);

    mypanel.doLayout(); // important


    Notes: mypanel must has its layout.

  5. #4
    Sencha User
    Join Date
    Jun 2011
    Location
    Kochi, Kerala, India
    Posts
    8
    Answers
    1

    Default

    Thanks atula_a1 it works for me even without doLayout() function. My I have used the add() method in wrong format...ie
    mypanel.items.add();
    that was wrong and when I cleared items it works fine.

Tags for this Thread

Posting Permissions

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