Click here to Skip to main content
16,020,990 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
So I am currently working on a project that are using different panels and I want to place some text on one of them but it seems to get places as a first layer when I want it on the 2rd layer, I will try to show you with GIFs

If you look at the label Auto-Scan it goes on top of all the other panels, And if I send it back it goes to the first panel I want it to get stuck on the "Most" Active panel which is the 2nd one.


http://i.stack.imgur.com/cSOTT.gif[^]

Also, its only the the "Auto-Size" label that is messing up the other 2 are just fine

What I have tried:

I've added them programaticlly but decided to remove them because it made my code very sloppy
Posted
Updated 13-Apr-16 21:31pm
Comments
Sagar Haridas Shinde 14-Apr-16 8:42am    
check control using "Document Outline". View > Other Windows > Document Outline
Philippe Mori 14-Apr-16 12:21pm    
Adjust the z order so that the label is below the panel. As far as I remember, you can do it directly from the contextual menu. Otherwise as other have suggested, you can use document outline or simply recreate the label.

1 solution

Remember when I mentions the "z-order" in your last question?
How this code flows ?[^]
That's what causes it.
Because you added the label after the panels, it has a higher number in the z-order, which means it sits on top of other controls.

How to fix it? Simple: move the label so it's part of the "Most Active" panel instead of on the form directly.
Try this: in the designer, highlight the "Most active" panel, and shrink it's size vertically - the label will remain in place. This shows that it isn't part of the panel at all!
The easiest way to add it to the panel is to delete it.
Then drag a new label from the toolbox, and drag it over the "Most active" panel until it's border appears. Then drop it on the panel. Now it's a part of the panel, and won't appear "above" other panels.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900