Results 1 to 7 of 7

Thread: hideTabStripItem alternative in Ext 4?

  1. #1
    Sencha User
    Join Date
    Aug 2008
    Posts
    101
    Vote Rating
    7
      0  

    Default hideTabStripItem alternative in Ext 4?

    I've noticed that hideTabStripItem is no longer a method of the tab panel, is there an alternative for 4.0? If there is some sort of tab config option that would make more sense anyways!

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    Each item in a TabPanel has an instance of Ext.tab.Tab which you can show/hide.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Aug 2008
    Posts
    101
    Vote Rating
    7
      0  

    Default

    very cool, can this be done by default through a config by chance?

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    So far I cannot find a way. Would think setting the item's hidden to true would do it but it doesn't have any effect.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  5. #5
    Ext JS Premium Member stevil's Avatar
    Join Date
    Nov 2007
    Location
    Denver, CO
    Posts
    1,045
    Vote Rating
    10
      0  

    Default

    Haven't tried it myself, Mitchell, but would using a cls of 'x-hidden' still work?

    stevil

  6. #6
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    Problem is they are two separate classes. TabPanel creates Ext.tab.Tab when it creates the child components so if you put a cls on the child item, it may not get placed on the Tab. But you can test it out... well, I will since it will only take a sec...


    Nope, cls didn't get placed on the Tab
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  7. #7
    Ext JS Premium Member stevil's Avatar
    Join Date
    Nov 2007
    Location
    Denver, CO
    Posts
    1,045
    Vote Rating
    10
      0  

    Default

    If the hidden property on the tab config (or in the defaults config for the TabPanel) is false, and doesn't behave as initially hidden (as the doc says it should), then I think this is actually a bug.

    It falls to AbstractComponent to obey hidden at render time (and the doc source link, while not necessarily current, shows code to do that at render (if (me.hidden) { me.el.hide(); })

    It would be interesting to see if that happens with other Button extenders than Tab?

    stevil

Similar Threads

  1. hideTabStripItem is not working on 3.2
    By intro in forum Ext 3.x: Help & Discussion
    Replies: 10
    Last Post: 24 Oct 2010, 4:41 PM
  2. alternative lightbox?
    By omegafox in forum Ext 3.x: Help & Discussion
    Replies: 9
    Last Post: 17 Aug 2010, 2:32 AM
  3. TabPanel - hideTabStripItem vs. remove
    By jakeext in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 4 Sep 2009, 1:08 PM
  4. Layout Issue after Hiding a tab using hideTabStripItem()
    By zurik44 in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 20 May 2009, 11:32 AM
  5. cachefile.net alternative?
    By piston in forum Community Discussion
    Replies: 3
    Last Post: 29 Jan 2009, 7:07 PM

Posting Permissions

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