954,529 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Problems with understanding Canvas

I am trying to draw a few items on a canvas using Canvas.TextOut mainly.
My problem is that when I grab the form holding the canvas and then move the form outside
of the screen and back again, all text and drawings have vanished, as if they have been erased.

Is this standard behaviour of canvas? or?

I am trying to make a kind of setup for writing to the canvas before I then send this canvas to the printer for printing.

I tested Canvas.Refresh, but this does not deal with the problem.

Do I need to dynamically assign labels of text for everything on the canvas for this to work?

Thanks in advance.
-Morten-

Morten Brendefu
Light Poster
44 posts since Mar 2011
Reputation Points: 38
Solved Threads: 2
 

Just Draw in the OnPaint event and everything will be okay. Or call the drawing functions from this event.

In this matter, I gave an example (attached file):
http://www.daniweb.com/software-development/pascal-and-delphi/threads/356130

Wolfgan
Junior Poster
101 posts since Jun 2010
Reputation Points: 34
Solved Threads: 14
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You