sunnyuser
24 Aug 2011, 3:56 AM
HI Guys,
I want to add child widget (ContentPanel countPanel) in right side on ContentPanel. I tried float attribute but it's not working.
Any suggestion will help me a lot to do this job.
ContentPanel panel = new ContentPanel();
panel.setHeight(24);
panel.setHeaderVisible(false);
panel.setBodyBorder(false);
panel.setBorders(false);
panel.setLayout(new HBoxLayout());
TextField<String> searchField = new TextField<String>();
searchField.setHeight(24);
searchField.setWidth(75);
panel.add(searchField);
Label goButton = new Label("Go");
panel.add(goButton);
populateAlphanPanel(panel);
final ContentPanel countPanel = new ContentPanel();
countPanel.setHeight(24);
countPanel.setHeaderVisible(false);
countPanel.setBodyBorder(false);
countPanel.setBorders(false);
countPanel.setLayout(new FitLayout());
Label countLabel = new Label(getCountStr(0, 0, 0));
countLabel.setHeight(24);
countPanel.add(countLabel);
countPanel.setStyleAttribute("float", "right");
panel.add(countPanel);
RootPanel.get().add(panel);
In this example, I want to add countPanel in the right side of panel.
with warm regards,
Sunny.
I want to add child widget (ContentPanel countPanel) in right side on ContentPanel. I tried float attribute but it's not working.
Any suggestion will help me a lot to do this job.
ContentPanel panel = new ContentPanel();
panel.setHeight(24);
panel.setHeaderVisible(false);
panel.setBodyBorder(false);
panel.setBorders(false);
panel.setLayout(new HBoxLayout());
TextField<String> searchField = new TextField<String>();
searchField.setHeight(24);
searchField.setWidth(75);
panel.add(searchField);
Label goButton = new Label("Go");
panel.add(goButton);
populateAlphanPanel(panel);
final ContentPanel countPanel = new ContentPanel();
countPanel.setHeight(24);
countPanel.setHeaderVisible(false);
countPanel.setBodyBorder(false);
countPanel.setBorders(false);
countPanel.setLayout(new FitLayout());
Label countLabel = new Label(getCountStr(0, 0, 0));
countLabel.setHeight(24);
countPanel.add(countLabel);
countPanel.setStyleAttribute("float", "right");
panel.add(countPanel);
RootPanel.get().add(panel);
In this example, I want to add countPanel in the right side of panel.
with warm regards,
Sunny.