[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Getting a TPanel to overlap child forms like  TMenu does

Posted on 2009-04-08
4
Medium Priority
?
632 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 2000 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 2000 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

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Screencast - Getting to Know the Pipeline
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month19 days, 20 hours left to enroll

873 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