Solved

Getting a TPanel to overlap child forms like  TMenu does

Posted on 2009-04-08
4
604 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 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

11 Experts available now in Live!

Get 1:1 Help Now