Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

overlapping timage components in delphi

Posted on 2011-03-06
2
Medium Priority
?
602 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 2000 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 38

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

636 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