-
10 May 2009 7:31 AM #1
[CLOSED] Window shadow not readjusting when the size of the Window changes
[CLOSED] Window shadow not readjusting when the size of the Window changes
popup = new Window();
popup.setAutoHeight(true); //(and all the components in it too)
Window has a FitLayout
In the FitLayout, there is a LayoutContainer (call it form) with a FormLayout
form has a bunch of fields, including a FieldSet at the end of it. The FieldSet is fairly large.
I start expanded. When I collapse it, the shadow of the Window doesn't shrink along with the rest of the Window.
-
10 May 2009 7:33 AM #2
Your approach is wrong. You cant use autoHeight with a fitlayout.
-
10 May 2009 7:37 AM #3
The problem also manifest itself if I use the default, FlowLayout and a RowLayout. What kind of Layout is one supposed to used with auto-= height?
-
10 May 2009 7:40 AM #4
Well, autoheight means the window grows automatically with the browserflow. There are no events fired with that. So the shadow cant be updated automatically. GXT tries to sync the shadow as best as possible. Please post a testcode that demonstrates the issues.
-
10 May 2009 7:45 AM #5
-
10 May 2009 8:00 AM #6
public class Test implements EntryPoint {
public void onModuleLoad() {
Window w = new Window();
w.setHeading("my favorite variables");
w.setWidth(500);
w.setAutoHeight(true);
w.setShadow(true);
w.add(new TestForm());
w.show();
}
static class TestForm extends LayoutContainer {
TestForm() {
FormLayout fl = new FormLayout();
fl.setDefaultWidth(300);
fl.setLabelWidth(100);
setLayout(fl);
setAutoHeight(true);
}
@Override
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
// Some fields
TextField foo = new TextField();
foo.setFieldLabel("foo");
TextField bar = new TextField();
bar.setFieldLabel("bar");
TextField baz = new TextField();
baz.setFieldLabel("baz");
// A field set
FieldSet fs = new FieldSet();
fs.setCollapsible(true);
fs.setHeading("quux");
fs.setExpanded(true);
TextArea quux = new TextArea();
quux.setHeight("5em");
fs.add(quux);
add(foo);
add(bar);
add(baz);
add(fs);
}
}
}
-
10 May 2009 8:01 AM #7
In which browser do you have the issue?
-
10 May 2009 8:07 AM #8
Doesn't fix it.
To restate: the issue is that when you collapse or expand the field set, the shadow for the entire window does not resize along with the window.
-
10 May 2009 8:10 AM #9
You need to listen the the fieldsets collapse and expand events and call
Code:window.sync(true)
-
10 May 2009 8:19 AM #10
I figured that's what you meant.
That works, actually - but the Window should be listening to its children for resize events and do this for me.
I am seeing this on Safari (and Hosted mode, same agent different version). Have not tested FF or IE.
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote