开发者

GWT DialogBox - sizing problem when animation is enabled

开发者 https://www.devze.com 2023-01-16 03:55 出处:网络
GWT client code: DialogBox dialog = new DialogBox(); dialog.setAnimationEnabled(true); SimplePanel panel = new SimplePanel();

GWT client code:

DialogBox dialog = new DialogBox();
dialog.setAnimationEnabled(true);
SimplePanel panel = new SimplePanel();
panel.setPixelSize(800, 600);
dialog.setWidget(panel);
dialog.center();

with the above code the width of the dialog is not set properly - the dialog is cut off at about 400 px.

Without animation enabled开发者_JAVA技巧 it works ok, like in the code fragment below:

DialogBox dialog = new DialogBox();
SimplePanel panel = new SimplePanel();
panel.setPixelSize(800, 600);
dialog.setWidget(panel);
dialog.center();

GWT ver 2.04

Firefox: 3.6.9

Chrome: 6.0.472.55 beta

Any ideas what the problem might be?


There are some known bugs with DialogBoxes and sizing.

http://code.google.com/p/google-web-toolkit/issues/detail?id=4597
http://code.google.com/p/google-web-toolkit/issues/detail?id=2595
http://code.google.com/p/google-web-toolkit/issues/detail?id=1424

There is a workaround which suggest to set the width on the gwt-DialogBox style.

0

精彩评论

暂无评论...
验证码 换一张
取 消