GXT//如何使用适合浏览器的BorderLayoutContainer?在 GXT 3.0 Beta2 中
我是 GXT 的新手。即使我英语不好..
我对 GXT:BorderLayoutContainer 有问题 (我使用GXT 3.0.0 Beta.2)
我想在浏览器中填写BodrderLayoutConatainer,但我不知道该怎么做。
在GXT 2.4中,我可以使用Fitable,但是,3.0则没有Fitable。
我怎样才能在 UiBinder 中做到这一点?(在 Xml 中)
提前致谢。
//我的来源
<container:SimpleContainer borders="true" styleName="style.test">
<container:BorderLayoutContainer borders="true" resize="false">
<container:north>
<gxt:ContentPanel resize="false" >
<button:TextButton text="north/contents/Button"></button:TextButton>
</gxt:ContentPanel>
</container:north>
<container:center>
<container:SimpleContainer resize="false" borders="true" >
<button:TextButton text="center/simple/Button" ></button:TextButton>
</container:SimpleContainer>
</container:center>
<container:south>
<button:TextButton text="ABC" borders="true"></button:TextButton>
</container:south>
</container:BorderLayoutContainer>
</container:SimpleContainer>
Dong ju
i'm a novice at GXT. Even i am not good at English..
I have a problem with GXT:BorderLayoutContainer
(I use GXT 3.0.0 Beta.2)
I wanna fill up BodrderLayoutConatainer in Browser, but I don't know How to do it.
In GXT 2.4, I can use Fitable, but, 3.0 there are not Fitable.
How can I do this in UiBinder?(in Xml)
Thanks in advance.
//my source
<container:SimpleContainer borders="true" styleName="style.test">
<container:BorderLayoutContainer borders="true" resize="false">
<container:north>
<gxt:ContentPanel resize="false" >
<button:TextButton text="north/contents/Button"></button:TextButton>
</gxt:ContentPanel>
</container:north>
<container:center>
<container:SimpleContainer resize="false" borders="true" >
<button:TextButton text="center/simple/Button" ></button:TextButton>
</container:SimpleContainer>
</container:center>
<container:south>
<button:TextButton text="ABC" borders="true"></button:TextButton>
</container:south>
</container:BorderLayoutContainer>
</container:SimpleContainer>
Dong ju
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这种情况下 SimpleContainer 是不必要的。此外,当您在 ui:style 中使用 css 类时,请确保将它们括在 {} 括号中,这样您就可以使用
styleName="{style.test}"
而不是styleName ="风格.测试"
。但就当前主题而言,将 BorderLayoutContainer 添加到视口,然后将其添加到页面,它将根据页面调整大小。这可能可以在 UiBinder 中完成,尽管我还没有尝试过。
视口的工作是根据可用窗口空间调整自身(及其子项)的大小。 SimpleContainer 将其子级调整为自身的大小 - 在构建 UI 时不经常使用它,但可以对其进行扩展以创建其他容器(FieldLabel 就是一个例子)。
The SimpleContainer is unnecessary in this case. Additionally, when you are using the css classes in the ui:style, make sure you wrap them in {} brackets, so you have
styleName="{style.test}"
instead ofstyleName="style.test"
.But on the topic at hand, add the BorderLayoutContainer to a Viewport, and add that to the page, and it will be sized to the page. This can probably be done in UiBinder, though I haven't tried.
Viewport's job is to size itself (and its children) to the available window space. SimpleContainer sizes its children to itself - it isn't often used when building a UI, but is extended to make other containers (FieldLabel is one example of this).