1. #1
    Ext GWT Premium Member
    Join Date
    Aug 2010
    Location
    Germany, Solingen
    Posts
    248
    Vote Rating
    3
    Answers
    4
    gishmo is on a distinguished road

      0  

    Default Unanswered: Close tab in TabPanel via coding

    Unanswered: Close tab in TabPanel via coding


    How can I close a existing tab in a TabPanel via coding?

    Thanks

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Vote Rating
    90
    Answers
    109
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    What do you mean by closing from code? If you mean to remove the tab, just calling tabPanel.remove(widget) or tabPanel.remove(i) (where i is the tab index) will remove the tab.

    If you mean to make the tab available to be closed by the user, modify its TabItemConfig instance to set its closable property to true.

  3. #3
    Ext GWT Premium Member
    Join Date
    Aug 2010
    Location
    Germany, Solingen
    Posts
    248
    Vote Rating
    3
    Answers
    4
    gishmo is on a distinguished road

      0  

    Default


    Thanks Colin, I mixed up some GXT 2.x with 3.x code.

    TabPanel.remove works fine! :-)

Thread Participants: 1