NiteshD
11 Jan 2010, 12:31 AM
Dear All,
I am creating the components using Border Layout (
public class BorderLayoutCls extends LayoutContainer). I want to add to rootpanel toi this component using Accordian Layout (To get the +/- buttons ).
The following code i used for adding the root panel.
public void onModuleLoad() {
// TODO Auto-generated method stub
BorderLayoutCls borderLayoutCls=new BorderLayoutCls();
AccordionLayout a= new AccordionLayout();
ContentPanel panel = new ContentPanel();
panel.setHeading("AccordionLayout");
panel.setBodyBorder(false);
panel.setLayout(a);
ContentPanel cp = new ContentPanel();
cp.setLayout(new FitLayout());
cp.setAnimCollapse(false);
cp.setHeading("Online Users");
cp.add(borderLayoutCls);
panel.add(cp);
panel.setSize(800,800);
// panel.setAutoHeight(true);
// panel.setAutoWidth(true);
RootPanel.get().add(panel);
}
If i specify panel.setSize(800,800) , the components are rendering properly.
But i want use the setAutoHeight(true)/ setAutoWidth(true) to automatically set the size of the widgets . but it is not working
Can you give some tip, where i done the mistake.
Thanks &Regards
Nitesh
I am creating the components using Border Layout (
public class BorderLayoutCls extends LayoutContainer). I want to add to rootpanel toi this component using Accordian Layout (To get the +/- buttons ).
The following code i used for adding the root panel.
public void onModuleLoad() {
// TODO Auto-generated method stub
BorderLayoutCls borderLayoutCls=new BorderLayoutCls();
AccordionLayout a= new AccordionLayout();
ContentPanel panel = new ContentPanel();
panel.setHeading("AccordionLayout");
panel.setBodyBorder(false);
panel.setLayout(a);
ContentPanel cp = new ContentPanel();
cp.setLayout(new FitLayout());
cp.setAnimCollapse(false);
cp.setHeading("Online Users");
cp.add(borderLayoutCls);
panel.add(cp);
panel.setSize(800,800);
// panel.setAutoHeight(true);
// panel.setAutoWidth(true);
RootPanel.get().add(panel);
}
If i specify panel.setSize(800,800) , the components are rendering properly.
But i want use the setAutoHeight(true)/ setAutoWidth(true) to automatically set the size of the widgets . but it is not working
Can you give some tip, where i done the mistake.
Thanks &Regards
Nitesh