Results 1 to 3 of 3

Thread: Close tab in TabPanel via coding

  1. #1
    Ext GWT Premium Member
    Join Date
    Aug 2010
    Location
    Germany, Solingen
    Posts
    274
    Answers
    4
    Vote Rating
    3
      0  

    Default 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,737
    Answers
    109
    Vote Rating
    93
      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
    274
    Answers
    4
    Vote Rating
    3
      0  

    Default

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

    TabPanel.remove works fine! :-)

Posting Permissions

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