问题
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