[Gambas-user] Can not draw outside of draw event handler

Demosthenes Koptsis demosthenesk at ...626...
Wed Mar 30 09:05:09 CEST 2011


ok,

i have looked the drawing examples.

i saw that the AnalogWatch is more near to what i want to implement.

But in this example it is used the Drawing.Refresh() which redesign the
clock form the beginning in each second.

As i learn now the Draw and Drawing classes i see that i have to use the
cache property in order to add shapes in drawingarea.




On Wed, 2011-03-30 at 01:06 +0200, Benoît Minisini wrote:
> > 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.
> > 
> 
> Why don't you take a look at any drawing example (except OnScreenDisplay) ?
> 

-- 
Regards,
Demosthenes Koptsis.





More information about the User mailing list