SmartGWT getOffsetHeight after layout is drawn

2019-08-03 16:11发布

问题:

I need get offsetHeight of Vlayout, but until i know that it's drawn. How I can check that, this component is drawn ?

回答1:

How I can check that, this component is drawn ?

You can override the onDraw method of Canvas and add some custom functionality there.

  @Override
  protected void onDraw()
  {
    super.onDraw();
    //your code
  }

Alternatively you can add a draw handler to the component:

 addDrawHandler(new DrawHandler() {

     @Override
     public void onDraw(DrawEvent event)
     {
        //Do stuff
     }
  });


标签: gwt smartgwt