GXT,如何使用 VBOXLayout 显示小部件标签

发布于 2024-12-27 16:23:43 字数 253 浏览 3 评论 0原文

我一直在尝试自己解决这个问题,但找不到任何答案。我需要组合框等的文本字段来显示其自己的标签,但我无法将其放在与 FormPanel 不同的面板上(其中一切都很好)。我正在尝试在 VBoxLayout 上显示文本字段的标签,但我找不到方法。

我需要使用 VBoxLayout ,因为我需要在窗口最大化或最小化后将小部件定位在表单的中间,并且此布局是唯一被证明有效的布局。还有其他方法可以实现此目的吗?

I have been trying to resolve this by myself but I can't find any answers. I need the text fields the combo box, etc., to display its own label, but I can't put it to work on a panel different from the FormPanel (in which all works great). I'm trying to display the labels for a text field on a VBoxLayout but I don't find the way to do it.

I need to work with a VBoxLayout because I need the widgets to position in the middle of the form after the window is maximized or minimized and this layout is the only one that proves to work. Is there another way to accomplish this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

海的爱人是光 2025-01-03 16:23:43

添加另一个 LayoutContainer,然后将面板设置为使用 FormLayout 例如

LayoutContainer innerPanel = new LayoutContainer();
innerPanel.setLayout(new FormLayout());

,现在它将像表单面板一样工作。

Add another LayoutContainer and then set the panel to use FormLayout for example

LayoutContainer innerPanel = new LayoutContainer();
innerPanel.setLayout(new FormLayout());

Now it will work just like a form panel.

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