Solved

overlapping timage components in delphi

Posted on 2011-03-06
2
598 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

687 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