首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >除标题外,看不到DockLayoutPanel内容

除标题外,看不到DockLayoutPanel内容
EN

Stack Overflow用户
提问于 2012-11-20 02:21:20
回答 5查看 1.4K关注 0票数 1

我正在尝试使用DockLayoutPanel来布局我的页面,我正在使用gwt-platfrom插件来创建展示者和视图对。当我在view.ui.xml中添加了以下代码时,我只能看到标题部分,其余部分不可见,我的方法出了什么问题?

代码语言:javascript
复制
    <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>

谢谢,

EN

Stack Overflow用户

发布于 2015-07-02 16:40:13

我用这个解决了。我正在使用GWTP:

代码语言:javascript
复制
<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>

票数 0
EN
查看全部 5 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13459755

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档