Solved

Getting a TPanel to overlap child forms like  TMenu does

Posted on 2009-04-08
4
615 Views
Last Modified: 2013-11-23
I have an app that generates forms with stayontop relative to the main form.  This works well and I've noticed that Tmenus, both the Mainmenu and popups when opened will overlap the other forms.

What I'd like to do is get TPanels to do the same thing, that is when they open they overlap the other windows in the application.  I'm just not sure what it is about the menus that allows them to overlap like that, and how I can set a TPanel to overlap like that.  

i have attached a jpg of a simple overlap of a menu over the other form windows.  I'm open to any help or suggestions.  Is it something inherent in Windows for menus and if so can I make one behave like a Tpanel or is there something I can do with a TPanel to make it have that behavior?  

Thanks in advance.
tpanel.jpg
0
Comment
Question by:CitizenBBN
  • 2
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
8080_Diver earned 500 total points
ID: 24211138
The problem that you are facing involves the definition of "Stay On Top".  The Menu's have a higher priority, if you will, and, therefore, their drop downs can be on top of the other forms.  However, the TPanl that is on, for instance, the MainForm is forced to conform to the layer of the MainForm, which is below that of the form you created and told to stay on top.
The short answer is, you can't really get there frm here.  You probably can't start from somewhere else and get there.
0
 

Author Comment

by:CitizenBBN
ID: 24361310
I was hoping there was some way to declare something as a menu that was more than a popup or drop down.  

I was however afraid that was the answer.  In essence as you said so well, "you can't get there from here."  

I left this up a while to see if anyone might have some amazing solution.  Doesn't look like that's going to happen.  We've begun designing on the assumption that it is not an option.  

I'll give it another day for good luck then close it and award the points.  
0
 
LVL 22

Assisted Solution

by:8080_Diver
8080_Diver earned 500 total points
ID: 24364386
I have struggled with a variant of this issue in the past and one solution that I used (albeit, not a perfect one) was to have the MainForm basically consist of a TMenu.  I would start that form at the upper left corner of the screen (although, if the user wanted to move it, I let them and remembered where they put it ;-).  Then as other forms popped up, the would be somewhere on the reset of the screen and could add selections to the menu opening (and remove them on exiting).  
I admit that it isn't a perfect solution but it might be a thought. ;-)
0
 

Author Comment

by:CitizenBBN
ID: 24707631
An interesting approach.  As you can tell from the time latency on this thread I got put on another project for a few weeks but I'm back on this one.  I'll give it a try and report my results.  
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

Suggested Solutions

Title # Comments Views Activity
Best Firemonkey component pack 1 119
Delphi inherited method 6 75
Delphi Yen format 3 45
Firemonkey webbrowser scrollbars ? 1 49
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

808 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