Search code examples
lazarustimage

Lazarus: stacking images, paint order


I want to design a simple game (lazarus 1.8.4) with an image as playing field and some figures (transparent images) over it, created on runtime. So typically more than one images are at the same position. How can I make sure, that the figures are above the playing field?


Solution

  • TControl has a function called BringToFront which will move the Control to the first position in the Z-Axis (the opposing function would be SendToBack). As TImage is derived from TControl the function applies to TImage as well.