Friday, April 19, 2013

Re: Hiding Tabs in TabLayoutPanel at runtime

Not pretty but this hides the contents of a tab and the tab itself.

myTabPanel.getTabWidget(1).setVisible(false);
myTabPanel.getTabWidget(1).getParent().setVisible(false);


On Wednesday, 28 July 2010 16:36:15 UTC+1, rvns-pats wrote:
Hi All,

  I am trying to hide and show some panels with in a TabLayout Panel
at runtime.

  I have the following code in my UiBInder

                <g:TabLayoutPanel ui:field="myTabPanel">
                         <g:tab >
                                <g:header>Tab1</g:header>
                                <g:FlowPanel ui:field="tab1Panel" height="100%" width="100%"></
g:FlowPanel>
                        </g:tab>
                        <g:tab >
                                <g:header>Tab2</g:header>
                                <g:FlowPanel ui:field="tab2Panel" height="100%" width="100%">
                                </g:FlowPanel>
                        </g:tab>
                </g:TabLayoutPanel>

 And in the View i have..( passing either true or false based on
whether i want to show the second tab or hide it.

     myTabPanel.getTabWidget(1).setVisible(true);

And it's not hiding the tab properly..

Any comments..

Thanks..

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment