Decorator panel outlook went a mess when expanded its width.
example source:
DecoratedTabPanel tabPanel = new DecoratedTabPanel();
// expand the width of the tab panel
tabPanel.setWidth("1000px");
tabPanel.setAnimationEnabled(true);
// a new tab
String[] tabTitles = { "Home", "Content", "More Info" };
// set a new table
FlexTable helloWorldTable = new FlexTable();
helloWorldTable.setCellSpacing(5);
helloWorldTable.setTitle("Hello World Example");
FlexCellFormatter cellFormat = helloWorldTable.getFlexCellFormatter();
helloWorldTable.setHTML(0, 0, "Hello World Example");
cellFormat.setColSpan(0, 0, 3);
cellFormat.setHorizontalAlignment(0, 0,
HasHorizontalAlignment.ALIGN_CENTER);
helloWorldTable.setHTML(1, 0, "Say hello, ");
final TextBox nameField = new TextBox();
nameField.setFocus(true);
nameField.selectAll();
helloWorldTable.setWidget(1, 1, nameField);
final Button sayButton = new Button("Say");
helloWorldTable.setWidget(1, 2, sayButton);
// Wrap the content in a DecoratorPanel
DecoratorPanel decPanel = new DecoratorPanel();
// decPanel.setWidth("500px");
decPanel.add(helloWorldTable);
// decPanel.setWidget(helloWorldTable);
tabPanel.add(decPanel, tabTitles[0]);
// Add a tab
tabPanel.add(new HTML(), tabTitles[1]);
// Add a tab
HTML moreInfo = new HTML("etc");
tabPanel.add(moreInfo, tabTitles[2]);
tabPanel.selectTab(0);
RootPanel.get().add(tabPanel);
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.