我在GWT和uiBinder中是新的,我需要在窗口缩小时显示一个滚动,以便显示具有固定大小的项。
UiBinder.xml
<clui:DockLayoutPanel unit='EM'>
<clui:center>
<clui:TabLayoutPanel barHeight="2" barUnit="EM" width="100%" height="100%" ui:field="tabs" />
</clui:center>
</clui:DockLayoutPanel>Java代码
@UiField TabLayoutPanel tabs;
interface IndexUiBinder extends UiBinder<Widget, Index> {
}
public doc() {
initWidget(uiBinder.createAndBindUi(this));
tabs.add(new FirstDoc(), "First");
tabs.add(new SecondDoc(), "Second");
}我尝试将属性添加到css中,就会出现滚动,但无法工作
body {
overflow:scroll;
}谢谢你的帮助。
发布于 2014-02-24 06:16:14
您需要使用ScrollPanel。你把它加进去(而且只有它!)在您的选项卡上,其他所有内容都在ScrollPanel中。
https://stackoverflow.com/questions/21977212
复制相似问题