Event ScrollArea.Draw (gb.qt4)
Event Draw ( )
Raised when something must be redrawn.
A Draw.Begin on the drawing area is
automatically called before raising the event, and the drawing is clipped to the
area to be redrawn.
Draw.End will be automatically called after the event.
Warning.
It is very important to NOT perform commands that may adjust or refresh existing objects inside the DrawingArea or refresh/resize the DrawingArea itself within the _Draw() event, this could cause an infinite refresh loop as setting some object properties will trigger the _Draw() event again.
The _Draw() event should only perform Paint/Draw commands.
Anything that could cause object to refresh/resize should be in the _Arrange() or _BeforeArrange() event.
Quote:
"Do only drawing stuff inside drawing event handlers! At least don't modify the control, you may create an infinite loop of refreshes."
If the
Painted property is set, a
Paint.Begin /
Paint.End is done instead.
Sinds 3.4
This property is useless and therefore deprecated since Gambas 3.4.
See also