我正在尝试使用DockLayoutPanel来布局我的页面,我正在使用gwt-platfrom插件来创建展示者和视图对。当我在view.ui.xml中添加了以下代码时,我只能看到标题部分,其余部分不可见,我的方法出了什么问题?
<ui:style>
.eastPanel {
background-color: #F60;
}
.westPanel {
background-color: #EEE;
}
.northPanel {
background-color: #39F;
}
.southPanel {
background-color: #99C;
}
.centerPanel {
background-color: #FFC;
}
</ui:style>
<g:DockLayoutPanel unit='EM'>
<g:north size='5'>
<g:FlowPanel styleName="{style.northPanel}">
<g:Label>This is the NORTH panel</g:Label>
</g:FlowPanel>
</g:north>
<g:west size='15'>
<g:FlowPanel styleName="{style.westPanel}">
<g:Label>This is the WEST panel</g:Label>
</g:FlowPanel>
</g:west>
<g:center>
<g:FlowPanel styleName="{style.centerPanel}">
<g:Label>This is the CENTER panel</g:Label>
</g:FlowPanel>
</g:center>
</g:DockLayoutPanel>
谢谢,
发布于 2015-07-02 16:40:13
我用这个解决了。我正在使用GWTP:
<ui:style>
.eastPanel {
background-color: #F60;
}
.westPanel {
background-color: #EEE;
}
.northPanel {
background-color: #39F;
}
.southPanel {
background-color: #99C;
}
.centerPanel {
background-color: #FFC;
}
header {
background: red;
}
</ui:style>
<g:RootLayoutPanel>
<g:layer>
<g:DockLayoutPanel >
<g:north size='60'>
<g:FlowPanel styleName="{style.northPanel}">
<g:Label>This is the WEST panel</g:Label>
</g:FlowPanel>
</g:north>
<g:west size='300'>
<g:FlowPanel styleName="{style.westPanel}">
<g:Label>This is the WEST panel</g:Label>
</g:FlowPanel>
</g:west>
<g:center>
<g:FlowPanel styleName="{style.centerPanel}">
<g:Label>This is the CENTER panel</g:Label>
</g:FlowPanel>
</g:center>
</g:DockLayoutPanel>
</g:layer>
</g:RootLayoutPanel>
https://stackoverflow.com/questions/13459755
复制相似问题