Forum > General

Autoredraw

(1/1)

aspi:
Hi!

I've just tried to draw a "persistent" line on a canvas: Form1.Canvas.Line(x1,y1,x2,y2)
The line appeared as expected, but if I move another window over it, the line is deleted where the   window was. So I activated the autoredraw property of the canvas: Form1.Canvas.AutoRedraw := True. At runtime I've checked it's state: autoredraw is true, but it doesn't work!?

Can anybody help me?

Aspi

Vincent Snijders:
I don't know if the autoredraw property is supported.

What you can do is, use the OnPaint event and do the drawing there. I have succesfully created a test app, with a PiantBox where I did my drawing in the OnPaint event. You might want to try, if you can use the OnPaint event of the form.

HTH,
Vincent.

aspi:
Thanks Vincent, your idea works fine. I've wrote a little manager that helps me in the 'OnPaint' event to know, what lines (or other objects) need to be drawn.

All right, up to the next messages...

Navigation

[0] Message Index

Go to full version