Friday, August 3, 2012

Re: How to vertically and horizontally centre the form panel inside a scroll panel

I tried many different options, but at the end, I had to do to render the page, and then call:

Scheduler.get().scheduleDeferred(new ScheduledCommand() {
    @Override
    public void execute() {
        myForm.getElement().setAttribute("style", "margin: " + ((myScrollPanel.getOffsetHeight() - myForm.getOffetHeight()) / 2) + "px auto;");
    }
});

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/n558Vremy18J.
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