Unfortunately the API documentation does not tell so much about the differences.
I guess the following:
Control.requestLayout() means calculating the size and position of a control inside a Composite when its content (like a text in a label or text field) has changed and perhaps its displayed size/position is not anymore appropriate.
I think I understand Control.pack(): It is just a part of Control.requestLayout or rather Composite.layout() as only the size of controls will be changed but not the position.
Control.redraw() and Control.update(): It seems to me that both methods just paint the control again and you call them when the operating system does not show it correctly anymore. You call the methods if size and position have not changed. The difference between both methods is that update() repaints the control immediately whereas redraw() can do it after some time.
I don't understand when I need to call Widget.reskin(). It seems to me the same as Control.redraw().
0 comments:
Post a Comment
Thanks