[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Flash file does not "send to back" in Delphi

Posted on 2011-09-02
5
Medium Priority
?
509 Views
Last Modified: 2012-05-12
Hi,

I have various Flash files in my Delphi app but I am unable to place any labels "above" or "on top of" the flash file.

Whenever I insert a label it falls behind the flash file and cannot be seen.

Any help will be much appreciated.

Thank you.
0
Comment
Question by:kylestimpson013
  • 2
  • 2
5 Comments
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 36472790
TLabel is not a "windowed" control (descendant of TWinControl)
It can only be placed at the lowest level on the container (on the form, or on a panel, or ...)

It also has no Z-order, so can not be stacked on top of other controls


Use a TPanel to place a text on top of the flash
0
 
LVL 25

Accepted Solution

by:
epasquier earned 2000 total points
ID: 36472808
or use TStaticText, which is an exact TLabel alternative BUT windowed
You can find it on your 'Additional' components palette tab

more info :
http://delphi.about.com/od/tlabeltstatictext/TLabel_TStaticText_Delphi_Label_Control_Usage_Tips_and_Tricks.htm
0
 

Author Comment

by:kylestimpson013
ID: 36472835
Thank you, but how do i make the background of TStaticText transparent? i need to put text over the flash file to show labels for certain items but the TStaticText transparency is set to true but not working?

I appreciate all the help.
0
 
LVL 25

Assisted Solution

by:epasquier
epasquier earned 2000 total points
ID: 36473207
yeah, I know, even with Delphi XE TStaticText transparency does not seem to work that great : it makes the background of its parent visible, not the object that is between them.

that is because what you want is a very complex issue to do perfectly.
Look there, the comments are interesting (last ones mostly)
http://stackoverflow.com/questions/4478649/draw-over-controls-in-dephi-form

in short, your best option would be to create a completely transparent windowed control that you put over all others. I might have something in store like that. I used it to display 'tactical moves' above a DirectX viewport in a strategic game I made.
The thing is, that you won't be able to interact with the controls beneath using the mouse, as your transparent windowed control will get all mouse events. So if you need it you'll have to reroute all messages in that transparent control mouse events to their rightful owners
0
 

Author Comment

by:kylestimpson013
ID: 37623207
After some further testing and research, i figured out a way to set the Flash file as the background in an application.

This is accomplished by setting the flash file for EVERYTHING that you wish to be viewed on top of it.

This takes time but its worth it in the end if you really require a flash file background.

I hope this helps someone else in the future too.

Thank you for all the help on this.
0

Featured Post

Independent Software Vendors: 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

In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses
Course of the Month17 days, 15 hours left to enroll

829 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