Solved

overlapping timage components in delphi

Posted on 2011-03-06
2
595 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 37

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

685 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