Re: the output of DialogBox is very strange

2012-02-29 Thread jhulford
I don't think setSize is really supported for the content area of the DialogBox since setSize is inherited from UIObject. I believe the size you're setting is the actual dialog box's outer dimensions (ie. the DecoratorPanel's table) and not your content's dimensions. What you'll really want to do

Re: the output of DialogBox is very strange

2012-02-28 Thread tong123123
thanks for the reply. I found the problem seems related to Dialogbox.setsize(), if call this method, the dialogBox will be very strange, just try the following to simulate: public class GWTTest1 implements EntryPoint, ClickHandler { private static class MyDialog extends DialogBox {

Re: the output of DialogBox is very strange

2012-02-28 Thread R.K.P. Pisters
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 cases: DialogBox dialogBox = new DialogBox(false, true); // or any other values for autohide

Re: the output of DialogBox is very strange

2012-02-28 Thread tong123123
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(showDialogB

the output of DialogBox is very strange

2012-02-28 Thread tong123123
I just want to show a dialogbox when press a button. the code is very simple: final SimpleSearchResultPanel test = new SimpleSearchResultPanel(); btnTest.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { // TODO Auto-generated met