GXT//如何使用适合浏览器的BorderLayoutContainer?在 GXT 3.0 Beta2 中

发布于 2024-12-29 06:00:51 字数 1228 浏览 3 评论 0原文

我是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

別甾虛僞 2025-01-05 06:00:51

在这种情况下 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 of styleName="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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文