You don't need all those Draw.Begin and Draw.End:

"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." (Wiki)

So, just do

iAct = 1
drawArea.Refresh



Am 29.03.2011 10:29, schrieb Demosthenes Koptsis:

> ----------------------
> Public Sub btnLine_Click()
> 
> iAct = 1
> Draw.Begin(drawArea)
> drawArea_Draw()
> Draw.End
> 
> End
> 
> 
> Public Sub btnPolygon_Click()
> 
> iAct = 2
> Draw.Begin(drawArea)
> drawArea_Draw()
> Draw.End
> 
> 
> End
> 
> 
> Public Sub drawArea_Draw()
> 
> Select Case iAct
>   Case 1 'draw line
> 
>     SetValues()
> 
>     Draw.Line(55, 47, 289, 367)
> 
> 
>   Case 2
> 
>    SetValues()
> 
>    Draw.Polygon(aPolygon)
> 
>  
> End Select
> 
> End
> --------------------------
> 
> 

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to