简体   繁体   English

GWT TabLayoutPanel进入披露面板

[英]GWT TabLayoutPanel into Disclosure Panel

I am trying to add TabLayoutPanel into DisclosurePanel but when I expand DisclosurePanel one tab only blinks and I do not see tab panel and its content: Here is my code: 我试图将TabLayoutPanel添加到DisclosurePanel中,但是当我展开DisclosurePanel时,一个标签仅闪烁,并且看不到标签面板及其内容:这是我的代码:

      TabLayoutPanel tabPanel = new TabLayoutPanel(2.5, Unit.EM);


                  .....

                 I have FieldPanel which correctly works 
              for (Widget w : fieldPanelContent) {
                 tabPanel.add(w, "Internal");
              }

           }

        }

     }

  }

  tabPanel.setVisible(true);

  tabPanel.setTitle("My TAb Panel");
  tabPanel.selectTab(0);
  parent.add(tabLayoutPanel);
where parent is my DisclosurePanel

Could you please, help me to resolve this issue? 您能帮我解决这个问题吗? Thank you in advance! 先感谢您!

You are mixing layout with non-layout panels. 您正在将布局与非布局面板混合在一起。 This is not going to work well, if you do not set the size of the TabLayoutPanel within the DisclosurePanel explicitly. 如果您未在DisclosurePanel明确设置TabLayoutPanel的大小,则此方法将无法正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM