PDA

View Full Version : [CLOSED] Incomplete display: TabItem with ColumnLayout and padding



drehberger
22 Jun 2009, 11:37 PM
In the following code, the TabItem has its bottom end too high so that the text is cut off.
I experience the problem only if a TabPanel/TabItem is used and the TabItem has ColumnLayout and it has padding set to a sufficiently small value (all three conditions must be fulfilled).

GXT version: current trunk (rev. 1548)
Mode: Hosted mode
OS: Windows XP

Code:


import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.TabItem;
import com.extjs.gxt.ui.client.widget.TabPanel;
import com.extjs.gxt.ui.client.widget.form.LabelField;
import com.extjs.gxt.ui.client.widget.layout.ColumnData;
import com.extjs.gxt.ui.client.widget.layout.ColumnLayout;
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;

public class Test implements EntryPoint {
public void onModuleLoad() {
LabelField descField = new LabelField("<b>A Label</b>");
LayoutContainer main = new LayoutContainer(new FormLayout());
main.add(descField);
TabItem parameterItem = new TabItem("Parameter");
parameterItem.setLayout(new ColumnLayout());
parameterItem.setStyleAttribute("padding", "10px");
parameterItem.add(main, new ColumnData(0.9));
TabPanel tabPanel = new TabPanel();
tabPanel.add(parameterItem);
RootPanel.get().add(tabPanel);
}
}

sven
23 Jun 2009, 2:43 PM
You need to size your TabPanel correctly. For example



tabPanel.setSize(400,300);


I am closing this issue.