2

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

BraginiNI
  • 576
  • 1
  • 16
  • 30

1 Answers1

0

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

orderManagmentTabItem.setLayout(new FillLayout()); //Sounds like what your after
AbstractChaos
  • 4,211
  • 1
  • 19
  • 28