Thanks for all the replies. The thread is getting a little beyond my comprehension.
I miss-read Tim’s email by creating only one canvas. I have since created a control set of Canvases and they worked as expected.
I put the same code:
g.ForeColor = &c838383
into my Paint event and had the same problem as before. To overcome this I put the following code in the Paint Event:
[quote] g.ForeColor = &c838383
Which is, of course, the same as I had before. When I put this code into the Paint event of my simple canvas project, it shortened the canvas painted area by 20px. This, of course, suggests that I am moving the canvases prior to painting, but I cannot wee where this might be. I am not sure if this is possible or within the rules of this forum (if not, I apologise in advance), but the project is very small (284kb). I wonder if I could send it to someone to see what the problem is.
Bill, as far as I can be sure, I have no code that repositions the canvases.
I have created a Property PaintImage as suggestion by Oliver. I had no idea where to put the code he suggested, so I put it in the DrawInto method to the subclassed canvas. When I ran the When I ran the project, at first nothing happened (the canvases were not given the darkgray background), and when I entered some data, it didn’t display. So I am led to believe I have put the code in the wrong method?
I have managed to get the app running by “fudging” the y coordinates of the Paint and DrawInto methods, and have to continue that throughout the app. Until I can gain some more experience with Xojo, I think that will have to do. I am surprising myself at how quickly I am able to do things with Xojo, and what I am attempting here is a small, but for me complicated program. With trial and error, this forum, and reading the Language Reference and other docs, it is all starting to make sense.
Thanks to you all.