Tuesday, February 28, 2012

Re: the output of DialogBox is very strange

What would you expect to see? It looks like you're missing a call to
DialogBox.setWidget. You're not telling the DialogBox what to display.

By the way, you don't have to subclass DialogBox for very simple

DialogBox dialogBox = new DialogBox(false, true); // or any other
values for autohide/modal
dialogBox.setSize("1000px", "800px");

Hope this helps,

On Feb 28, 1:42 pm, tong123123 <tong123...@gmail.com> wrote:
> I found that even using the gwt stockwatcher sample code and add a
> button to show the DialogBox also has this problem
> StockWatcher.java in GWT tutorial
>     private Button showDialogBox = new Button("show");
>     showDialogBox.addClickHandler(new ClickHandler(){
>     ...
>     addPanel.add(showDialogBox);
>     ......
>             @Override
>             public void onClick(ClickEvent event) {
>                 // TODO Auto-generated method stub
>                 DialogBox1 dialogBox1 = new DialogBox1();
>                 dialogBox1.setSize("1000px", "800px");
>                 dialogBox1.center();
>                 dialogBox1.show();
>             }
> the dialogbox1 is just a DialogBox object as follow:
>     package com.google.gwt.sample.stockwatcher.client;
>     import com.google.gwt.user.client.ui.DialogBox;
>     public class DialogBox1 extends DialogBox{
>         public void onLoad(){
>             this.setAnimationEnabled(true);
>             this.setGlassEnabled(true);
>         }
>     }
> before click the show button, everything is normal, the DialogBox is
> not shown yet.
> After click the show button, the DialogBox shown is very strange, with
> strange line occur in the DialogBox.
> this time I try to use Firefox 5.0 and IE8 and both have this
> problem!!

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment