1. #1
    Ext GWT Premium Member
    Join Date
    Jan 2009
    Location
    Colorado Springs, CO
    Posts
    381
    Vote Rating
    5
    DavidHoffer is on a distinguished road

      0  

    Question How to set the width of a TabItem's tab?

    How to set the width of a TabItem's tab?


    I want to have nested TabPanels. In the sub TabPanel there will only ever be two TabItems. How can I set the width of these two TabItems to be 50%? E.g. I don't want the tab header's width to be based on the width of the text content, I want it to be about half the parent panel's width. How can I do this?

  2. #2
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    870
    Vote Rating
    1
    micgala is on a distinguished road

      0  

    Default


    Hi.

    Try setting
    PHP Code:
    tabPanel.setResizeTabs(true
    This probably will be enough for you.

    Regards,
    Michel.

  3. #3
    Ext GWT Premium Member
    Join Date
    Jan 2009
    Location
    Colorado Springs, CO
    Posts
    381
    Vote Rating
    5
    DavidHoffer is on a distinguished road

      0  

    Default


    This is weird. If I just call...

    setResizeTabs(true)

    about 50% of the time the tabs are just a bit wider than the text requires...the other 50% there is no difference (normal size).

    If I set the min tab width first...

    tabPanel.setMinTabWidth(295);
    tabPanel.setResizeTabs(true);

    Then about 66% of the time it will be larger as needed. However the other 33% of the time it's back to normal size. What's up with this? How do I make it work 100% of the time?

    -Dave

Thread Participants: 1