[Gambas-user] Again on DrawingArea
Rob
sourceforge-raindog2 at ...94...
Mon Aug 1 02:28:26 CEST 2005
On Sunday 31 July 2005 06:09, PV wrote:
> This happens because now it seems that the Draw event is constantly
> called in an endless loop, whereas, in versions <= 1.9.12, it was
> called only once when some redrawing was needed.
> What happened? :-)
I have no idea what happened, but when using any language and any
graphical toolkit that fires a redraw event, I always make a global
(or module-level) variable called something like CurrentlyRedrawing,
check to see if it's nonzero at the beginning of the draw event code,
exit if it is, set it if it's not, and unset it at the end of the
draw event. In Gambas, it's something like
PUBLIC CurrentlyRedrawing AS Integer
PUBLIC SUB DrawingArea1_Draw()
IF CurrentlyRedrawing THEN RETURN
CurrentlyRedrawing = 1
' redrawing routines here....
CurrentlyRedrawing = 0
END
Hope that points you in the right direction.
Rob
More information about the User
mailing list