Solved

overlapping timage components in delphi

Posted on 2011-03-06
2
589 Views
Last Modified: 2012-05-11
I have a Delphi application and on a form several timage components each containing a picture.
Says I have Image1, Image2, Image3
How can I programmatically change which image is "above" others at run time ?
What is the property governing that ?
0
Comment
Question by:LeTay
2 Comments
 
LVL 2

Accepted Solution

by:
RezaSadigh earned 500 total points
ID: 35046333
Hi
Use BringToFront method. for example if you want to order Image4, Image2, Image1, Image3 use this code
Image3.BringToFront
image3.refresh
Image1.BringToFront
image1.Refresh
Image2.BringToFront
image2.Refresh
Image4.BringToFront
Image4.Refresh
Application.ProcessMessages
0
 
LVL 36

Expert Comment

by:Geert Gruwez
ID: 35046473
The bring to front is ok,
but you need only call update of the container

Image3.BringToFront
Image1.BringToFront
Image2.BringToFront
Image4.BringToFront

PanelX.Update;

individually redrawing each image will be slower than only redrawing at the end
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now