GWT中的TabPanel和TabLayoutPanel有什么不同 [英] What's the difference between TabPanel and TabLayoutPanel in GWT

查看:81
本文介绍了GWT中的TabPanel和TabLayoutPanel有什么不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GWT中的TabPanel和TabLayoutPanel有什么区别?我无法在Google中找到答案,并且很难理解阅读文档。

解决方案

TabLayoutPanel 是一个布局面板:从外部输入的大小,它必须被给予明确的维度并在它们发生变化时得到通知( RequiresResize ),同样会调整其子元素的大小并通知它们( ProvideResize )。



TabPanel 不是;它的大小从内到外:它将根据选定选项卡中小部件的大小自行调整大小。


What's the difference between TabPanel and TabLayoutPanel in GWT? I can't find the answer in Google and it is difficult to understand reading docs

解决方案

TabLayoutPanel is a layout panel: it's sized from the outside-in, it has to be given explicit dimensions and be notified when they changed (RequiresResize), and similarly will resize its children and notify them when it does so (ProvidesResize).

TabPanel is not; it's sized from the inside-out: it'll resize itself depending on the size of the widget in the selected tab.

这篇关于GWT中的TabPanel和TabLayoutPanel有什么不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆