PDA

View Full Version : place a dialogBox on the RootPanel



Ceene
5 Sep 2011, 6:29 AM
Hey at all

I have a question about the Dialog-Widget. If I say "show" with the dialog the dialog shows up in the center. But I like to show the dialog in the upper right corner of the browser. How can I do this?

I hope for help :>

sven
5 Sep 2011, 6:40 AM
final Dialog simple = new Dialog(){
@Override
protected void afterShow() {
super.afterShow();
el().alignTo((com.google.gwt.user.client.Element) Document.get().getBody().cast(), "tr-tr?", null);
}
};

Ceene
5 Sep 2011, 11:24 PM
Thanks it works perfect,
but I have still a little question.

Is there a possibillity to place the dialog with top and left?