SmartGWT getOffsetHeight after layout is drawn

余生颓废 提交于 2019-12-11 13:26:12

问题


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
     }
  });


来源:https://stackoverflow.com/questions/14380558/smartgwt-getoffsetheight-after-layout-is-drawn

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!