Tuesday, February 5, 2013

Re: How get widget width, after it's drawed ?

Since you're using SmartGWT, use addDrawHandler(..). The callback gets invoked after the widget is rendered.

vLayout.addDrawHandler(new DrawHandler() {
    @Override
    public void onDraw(DrawEvent drawEvent) {
        ..
    }
})


On Mon, Jan 21, 2013 at 9:09 AM, Michał Zakrzewski <michal.zakrzewski88@gmail.com> wrote:
I have that code in my app

Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {

@Override
public void execute() {

try {

answerPanelHeight = display.getAnswerPanel().getOffsetHeight();

display.getNextButtonPanel().setHeight(answerPanelHeight);

display.getNextButtonPanel().redraw();

} catch (Exception e) {

}

}
});

What argument I must add in Widget.addAttachHandler() ? Because I use SmartGwt and i dont have method onLoad();

--
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/-/iI4QFhUWRsYJ.

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.

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

No comments:

Post a Comment