SmartGWT getOffsetHeight after layout is drawn

2019-08-03 15:45发布

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

标签: gwt smartgwt
1条回答
萌系小妹纸
2楼-- · 2019-08-03 16:16

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
     }
  });
查看更多
登录 后发表回答