imagexojo

Xojo Image Stacking Order


In my Xojo application I dynamically create Canvas objects. I want these to stack in a specific order. However, I can't seem to get the images to stack the way I want. How can I specify the order in which the images appear?


Solution

  • If you are trying to stack/tile canvas objects then you might be better of trying to work the various images inside the canvas.paint event. Stacking of controls will almost always guarantee poor performance and flicker (especially in Windows).

    There might be valid reasons for doing what you're doing, but I suspect that it's not the best Xojo way. Without more info it's hard to say.

    Think of the canvas object in the say that old animations were done. You draw the background, then you draw the objects in the next layer up, and then the next layer and so on. This is remarkably fast (we created a full fledged word processor that does this with insertion prompt, etc).