内容面板自动调整大小 gxt
我正在使用 gxt 实现用户界面。我有带有 TabPanel 的 mainForm 类。 TabPanel 的 TabItem 很少。在 orderManagmentTabItem 上,我有一个 ContentPanel。
TabPanel mainFormTab = new TabPanel ();
mainFormTab.setAutoHeight(true);
mainFormTab.setAutoWidth(true);
TabItem orderManagmentTabItem = new TabItem("TabItem 1");
orderManagmentTabItem.setAutoWidth(true);
orderManagmentTabItem.setAutoHeight(true);
OrderManagmentTabPanel orderManagmentTabPanel = new OrderManagmentTabPanel(); //contentpanel
orderManagmentTabItem.add(orderManagmentTabPanel);
TabItem warehouseManagmentTabItem = new TabItem("TabItem 2");
warehouseManagmentTabItem.setAutoWidth(true);
warehouseManagmentTabItem.setAutoHeight(true);
所以我想将 Autozise 设置为 orderManagmentTabPanel,但不能这样做。我在 orderManagmentTabPanel 类中编写 setAutoHeight(true) 和 setAutoWidth(true) ,但是当我运行我的应用程序 orderManagmentTabPanel 时,它是空的。 比我尝试在创建 OrderManagmentTabPanel 副本后设置自动大小
TabItem orderManagmentTabItem = new TabItem("TabItem 1");
orderManagmentTabItem.setAutoWidth(true);
orderManagmentTabItem.setAutoHeight(true);
OrderManagmentTabPanel orderManagmentTabPanel = new OrderManagmentTabPanel(); //contentpanel
orderManagmentTabPanel.setAutoWidth(true);
orderManagmentTabPanel.setAutoHeight(true);
orderManagmentTabItem.add(orderManagmentTabPanel);
,但也没有帮助还
尝试在没有 ContenPanel 的情况下实现 TabItem 类并将其添加到 mainFormTab,但也不起作用。
如何使 TabItem 自动调整大小?
谢谢
I am implementing a user interface using gxt. I have mainForm class with TabPanel.
TabPanel has few TabItems. On orderManagmentTabItem I have a ContentPanel.
TabPanel mainFormTab = new TabPanel ();
mainFormTab.setAutoHeight(true);
mainFormTab.setAutoWidth(true);
TabItem orderManagmentTabItem = new TabItem("TabItem 1");
orderManagmentTabItem.setAutoWidth(true);
orderManagmentTabItem.setAutoHeight(true);
OrderManagmentTabPanel orderManagmentTabPanel = new OrderManagmentTabPanel(); //contentpanel
orderManagmentTabItem.add(orderManagmentTabPanel);
TabItem warehouseManagmentTabItem = new TabItem("TabItem 2");
warehouseManagmentTabItem.setAutoWidth(true);
warehouseManagmentTabItem.setAutoHeight(true);
So I want to set Autozise to orderManagmentTabPanel, but can't do this. I write setAutoHeight(true) and setAutoWidth(true) in orderManagmentTabPanel class, but whet I run my app orderManagmentTabPanel is empty.
Than I tried to set autosize after creating OrderManagmentTabPanel copy
TabItem orderManagmentTabItem = new TabItem("TabItem 1");
orderManagmentTabItem.setAutoWidth(true);
orderManagmentTabItem.setAutoHeight(true);
OrderManagmentTabPanel orderManagmentTabPanel = new OrderManagmentTabPanel(); //contentpanel
orderManagmentTabPanel.setAutoWidth(true);
orderManagmentTabPanel.setAutoHeight(true);
orderManagmentTabItem.add(orderManagmentTabPanel);
But didn't help also
Also tried to implement TabItem class without ContenPanel and add it to mainFormTab, but also didn't work.
How can I make my TabItem to be autosized?
Thx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,所以我相信你的意思是(如果我错了,请纠正我)你的选项卡项目上有一个面板,并且试图确保它占用 100% 的空间?
例如尝试设置布局
OK so I believe you mean (correct me if I am are wrong) you have a panel on a tab item and are trying to ensure it takes 100% of the space?
try setting a layout for example