View Full Version : problem with shadow
fother
23 Jan 2009, 8:25 AM
public void onModuleLoad() {
ContentPanel panel = new ContentPanel();
panel.setHeight(300);
panel.setHeading("panel");
new Resizable(panel, "s");
Window window = new Window();
window.setWidth(500);
window.setAutoHeight(true);
window.add(panel);
window.show();
}
look the attachment
kolli
26 Jan 2009, 5:25 AM
well thats because your window size is larger than the panel. If you are not going to place any widgets down there why dont you have both of them of the same size?
fother
26 Jan 2009, 7:20 AM
this is a example... I use one grid into a window, and the user can resize to show more lines..
kolli
26 Jan 2009, 7:27 AM
well i quite didnot understand your question.
Are you talking about having a different color to the remaining area in the window ( that doesnot contain the contentpanel) ? If that is the case then try to set the css for the window color . I dont think that comes under a shadow.
fother
26 Jan 2009, 8:31 AM
the problem is that when you resize the window.. the shadow don't resize
You are not resizenig the Window but the panel inside. You need to sync the shadow again as you have autoHeight set to true.
fother
26 Jan 2009, 8:39 AM
how I do to solve this problem?
kolli
26 Jan 2009, 9:23 AM
well why dont you try this if you want to have a fixed shadow to be added when ever the panel is resized.
public void onModuleLoad() {
ContentPanel panel = new ContentPanel();
panel.setHeight(300);
panel.setHeading("panel");
Resizable resize= new Resizable(panel, "s");
final Window window = new Window();
window.setWidth(500);
window.setHeight(500);
// window.setAutoHeight(true);
window.add(panel);
window.show();
resize.addResizeListener(new ResizeListener(){
@Override
public void resizeEnd(ResizeEvent re) {
window.setHeight(re.component.el().getHeight()+200);
super.resizeEnd(re);
}
});
}
fother
26 Jan 2009, 9:38 AM
the code that you suggested should not be use for default in Window component when is resize?
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.