well actually before send the previous email i used that you say Matti.

But drawArea.Refresh it Redraws the control.

This may be call automatic the Draw.Begin and Draw.End but clears
totally all the area and i cannot draw one rectangle and after a circle
and then something else.

So the solution i found was to set TRUE the Cache property.

i attach the project if anyone like to see it.

it is an example as Image example. It tries to demostrate the Draw and
DrawingArea objects. It has some of the drawings methods, not all of
them as Image example.

Now i am wondering what is the code to make the same example with Cache
property be set to FALSE. What you say is it possible? Until now i could
not find something.


On Tue, 2011-03-29 at 17:21 +0200, Matti wrote:
> 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

-- 
Regards,
Demosthenes Koptsis.

Attachment: Project99.tar.gz
Description: application/compressed-tar

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