Solved

Getting a TPanel to overlap child forms like  TMenu does

Posted on 2009-04-08
4
608 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE2 application frozen on Windows 10 10 278
Delphi Mdi application Child forms get behind control 7 166
Delphi Form ownership 4 73
update joined tables 2 32
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now