flyingbo
12 May 2009, 4:20 AM
Hello @ all,
i´ve got a problem with a contentpanel and the functions expand() and collapse().
ContentPanel cp = new ContentPanel();
cp.setBorders(true);
cp.setHeaderVisible(true);
cp.setLayout(new FitLayout());
cp.setAnimCollapse(false);
cp.setCollapsible(true);
BorderLayoutData data = new BorderLayoutData(LayoutRegion.WEST,100);
data.setMargins(new Margins());
data.setCollapsible(true);
viewport.add(cp, data);
after this i would collapse or expand the contentpanel by buttonclick.
if(cp.isExpanded()){
cp.collapse();
}
if(cp.isCollapsed()){
cp.expand();
}
The first time i clicked the button, the contentpanel expand and after it collapse. but after the second click the contentpanel don´t expand. I checked this with the debugger and it´s all fine. the cp.expand()-command execute but there are no changes happen in the gui.
Can anybody help?
Thanks and best wishes
Chris
i´ve got a problem with a contentpanel and the functions expand() and collapse().
ContentPanel cp = new ContentPanel();
cp.setBorders(true);
cp.setHeaderVisible(true);
cp.setLayout(new FitLayout());
cp.setAnimCollapse(false);
cp.setCollapsible(true);
BorderLayoutData data = new BorderLayoutData(LayoutRegion.WEST,100);
data.setMargins(new Margins());
data.setCollapsible(true);
viewport.add(cp, data);
after this i would collapse or expand the contentpanel by buttonclick.
if(cp.isExpanded()){
cp.collapse();
}
if(cp.isCollapsed()){
cp.expand();
}
The first time i clicked the button, the contentpanel expand and after it collapse. but after the second click the contentpanel don´t expand. I checked this with the debugger and it´s all fine. the cp.expand()-command execute but there are no changes happen in the gui.
Can anybody help?
Thanks and best wishes
Chris