Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Oct 2008
    Location
    Ger
    Posts
    178
    Vote Rating
    0
    tubamanu is on a distinguished road

      0  

    Default [FIXED-107] Adding Panel to TabPanel

    [FIXED-107] Adding Panel to TabPanel


    Hi Folks,

    i'm trying to implement a simple sencha application with an tabpanel that contains two panels.
    My Problem is that i cannot add any panels to my tabpanel. I used the function add and addDocked but nothings workes........

    My Code is like this

    Code:
    cf.Main = function(){return {
        
        theTabPanel                            :false,
        theFirstPanel                            :false,
        theSecondPanel                        :false,
        
        init: function () {
            
            this.initFirstPanel();
            this.initSecondPanel();
            this.initTabPanel();
            this.theTabPanel.add(this.theFirstPanel);
        },
        
        
        initTabPanel: function () {
            this.theTabPanel = new Ext.TabPanel({
                fullscreen: true,
                animation: 'slide'
            });
        },
        
        initFirstPanel: function () {
            this.theFirstPanel = new Ext.Panel({
                title: 'Great Panel 1',
                html: '!!!!!!!!!!!!!!'
            });
        },
        
        initSecondPanel: function () {
            this.theSecondPanel = new Ext.Panel({
                title: 'Great Panel 2',
                html: '????????????????'
            });
        }
        
    };}();

  2. #2
    Sencha - Training Team mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    690
    Vote Rating
    12
    mrsunshine will become famous soon enough

      0  

    Default


    you have to do a doLayout after add() a panel to you tabpanel
    try
    PHP Code:
    this.initTabPanel.add(this.theFirstPanel);
    this.initTabPanel.doLayout(); 

  3. #3
    Ext User
    Join Date
    Oct 2008
    Location
    Ger
    Posts
    178
    Vote Rating
    0
    tubamanu is on a distinguished road

      0  

    Default


    thx for your replay,

    i tested doLayout() but it has no effect.

    if i use
    Code:
        initTabPanel: function () {
            this.theTabPanel = new Ext.TabPanel({
                fullscreen: true,
                animation: 'slide',
                items:[item1, item2]
            });
        }
    it works.

    but in this way, it is hard to add dynamically TabItems^^

    cheers from S

  4. #4
    Sencha - Training Team mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    690
    Vote Rating
    12
    mrsunshine will become famous soon enough

      0  

    Default


    Its a bug in Ext.TabPanel which occurs if you add a item after the TabPanel is rendered.

    add the doLayout function to you tappanel configuration shut fix the problem
    PHP Code:
    this.theTabPanel = new Ext.TabPanel({
      
    fullscreentrue,
      
    animation'slide',
      
    doLayout: function() {
       
    Ext.TabPanel.superclass.doLayout.call(this);
       
    this.getTabBar().doLayout();
      }
    }); 
    and than do the doLayout() call after you add a new item

    PHP Code:
    this.theTabPanel.add(this.theFirstPanel);
    this.theTabPanel.doLayout(); 

  5. #5
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    8
    TommyMaintz will become famous soon enough

      0  

    Default


    I am moving this thread to the bug forum and will make sure this is solved in our next release.

  6. #6
    Ext User
    Join Date
    Oct 2008
    Location
    Ger
    Posts
    178
    Vote Rating
    0
    tubamanu is on a distinguished road

      0  

    Default


    great

    thx for your help

Similar Threads

  1. Replies: 23
    Last Post: 11 Aug 2010, 11:04 AM
  2. Dynamically adding a TabPanel to a Panel Region
    By mr_nil in forum Ext 3.x: Help & Discussion
    Replies: 7
    Last Post: 20 Nov 2009, 8:51 AM
  3. [OPEN] [FIXED]Adding TabItem to empty TabPanel
    By Colin Alworth in forum Ext GWT: Bugs (2.x)
    Replies: 3
    Last Post: 16 Jun 2009, 6:15 AM
  4. adding dynamic content in panel within tabpanel
    By pearl_123 in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 18 Apr 2009, 6:50 AM
  5. Adding a panel dynamically to a tabpanel
    By JanL in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 14 Mar 2008, 9:45 AM

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