Maarten wrote:
The paint event fires when the canvas needs to be repainted. You could make
an array of 28 pictures and draw to those, and then in the canvas paint
event draw the correct picture. If you need to draw something on the canvas
you should first draw to the correct picture and then do
canvas.refresh(this will cause it to fire the paint event).
I agree with Maarten. By using a single canvas you will avoid issues
with flickering and control order that could be a real pain with so many
controls. As for your rect shape, you can use the graphics.drawrect
method to draw the border around each image.
This is just a quicky snippet that may help answer some of the questions
that might arise by switching to this method. This fills a large canvas
with copies of a 96x96 image (MyPicture) each within a 2 pixel blue frame:
dim x,y as integer
for x = 1 to g.width step 100
for y = 1 to g.height step 100
g.foreColor = rgb(0,0,255)
g.penwidth = 2
g.drawrect x,y,98,98
g.drawpicture(MyPicture,x + 1, y + 1)
next
next
It could use a lot of improvement, but it should be a good starting point.
hth,
Brian
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>