473,390 Members | 1,156 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,390 software developers and data experts.

Layout manager issue when docking panels?

I was playing around with a new Windows form yesterday. I wanted to drop two
panels on the form. The first would be set Dock=Top. The second would be set
Dock=Fill.

So, I dropped the first panel and set its Dock property to Top. I then dropped
the second panel on the form and set its Dock property to Fill.

Holy disappearing panels, Batman. The second panel filled the entire form
hiding the first panel. So, when I dropped my grid control on the second panel
which was set to Dock=Fill, it filled the entire screen.

I eventually got what I needed by cutting and pasting the controls, which was a
suggestion of a fellow developer at work, but it was a bit annoying.

Is there a bug in the layout manager in the forms designer that is causing this
behavior?

Nov 15 '05 #1
4 6372
This is typically due to the Z-ordering of the controls on the form. The
Z-order effects which controls are "on top" of other controls (the 3D
dimension to 2D graphics). You can right-click on a control (such as the
panel) and use the "Bring to Front" and "Send to Back" to change the
Z-ordering of a control.

Actually, when repeating the operation you describe below, I could not
reproduce the exact results with VS.NET 2003. But hopefully the above
mentioned Z-ordering will help if this occurs in the future.

Cheers,

-Noah Coad
Microsoft MVP & MCP

"Kerry Sanders" <di****@NOSPAMyahoo.com> wrote in message
news:4i********************************@4ax.com...
I was playing around with a new Windows form yesterday. I wanted to drop two panels on the form. The first would be set Dock=Top. The second would be set Dock=Fill.

So, I dropped the first panel and set its Dock property to Top. I then dropped the second panel on the form and set its Dock property to Fill.

Holy disappearing panels, Batman. The second panel filled the entire form
hiding the first panel. So, when I dropped my grid control on the second panel which was set to Dock=Fill, it filled the entire screen.

I eventually got what I needed by cutting and pasting the controls, which was a suggestion of a fellow developer at work, but it was a bit annoying.

Is there a bug in the layout manager in the forms designer that is causing this behavior?

Nov 15 '05 #2
Actually it is a bug in VS.Net 2002 that was fixed in VS.Net 2003

It invloves the order that you are adding the panels to the form
You need to drop the panel that you want to Dock=Fill first
Set Dock=Fill
then you can drop the panel that you want to Dock=Top next
Set Dock =Top

"Noah Coad [MCP & MVP]" <no**@coad.net> wrote in message
news:ef**************@TK2MSFTNGP11.phx.gbl...
This is typically due to the Z-ordering of the controls on the form. The
Z-order effects which controls are "on top" of other controls (the 3D
dimension to 2D graphics). You can right-click on a control (such as the
panel) and use the "Bring to Front" and "Send to Back" to change the
Z-ordering of a control.

Actually, when repeating the operation you describe below, I could not
reproduce the exact results with VS.NET 2003. But hopefully the above
mentioned Z-ordering will help if this occurs in the future.

Cheers,

-Noah Coad
Microsoft MVP & MCP

"Kerry Sanders" <di****@NOSPAMyahoo.com> wrote in message
news:4i********************************@4ax.com...
I was playing around with a new Windows form yesterday. I wanted to drop
two
panels on the form. The first would be set Dock=Top. The second would
be set
Dock=Fill.

So, I dropped the first panel and set its Dock property to Top. I then dropped
the second panel on the form and set its Dock property to Fill.

Holy disappearing panels, Batman. The second panel filled the entire

form hiding the first panel. So, when I dropped my grid control on the

second panel
which was set to Dock=Fill, it filled the entire screen.

I eventually got what I needed by cutting and pasting the controls,
which was a
suggestion of a fellow developer at work, but it was a bit annoying.

Is there a bug in the layout manager in the forms designer that is
causing this
behavior?


Nov 15 '05 #3
Thanks for the replies everyone. I am not sure if the
issue has been fixed, because I definited duplicated it
yesterday in .Net 2003 as have others in our office.

Anyway, thanks for the tip on the order in which the
panels should be dropped. Much appreciated!
-----Original Message-----
Actually it is a bug in VS.Net 2002 that was fixed in VS.Net 2003
It invloves the order that you are adding the panels to the formYou need to drop the panel that you want to Dock=Fill firstSet Dock=Fill
then you can drop the panel that you want to Dock=Top nextSet Dock =Top


Nov 15 '05 #4
>It invloves the order that you are adding the panels to the form
You need to drop the panel that you want to Dock=Fill first
Set Dock=Fill
then you can drop the panel that you want to Dock=Top next
Set Dock =Top

I just how had a chance to try this out. This tip worked perfectly. Thanks
again.

Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Steve McLellan | last post by:
Hi, I'm trying to add panels to a parent panel programatically. I'd like them to all take up an equal amount of the parent form as it's resized etc. Using Docking::Fill obviously causes one...
25
by: Dennis | last post by:
Has anyone really gotten the Docking and Splitter Bars to work for anyting but the simplest application for two controls and one splitter bar filling the whole form? If so, can you enlighten my on...
1
by: Ronchese | last post by:
Hi All, I 'm doing a form that have two dockable panels, one at top and other at left (for sample). The user can double-clicks the panels and they become floating, which double-clicked again,...
2
by: Jason | last post by:
Hello I've created a form that serves as a front end for a DB. My question is how to resize the form, and have the control on the form resize themselves as i drag the form. I've got a status...
0
by: sonali_reddy123 | last post by:
Hi all, I am using a crownwood components docking manager in my application.I want to assign a tip to the Auto Hide and close buttons present for the docking manager. But the properties...
9
by: Yuk Tang | last post by:
I'm trying to create webpage-style frames on a form, and all the get parent size and resize children malarkey is giving me a headache. What I would like to do is define some frames on the parent...
1
by: Anoop | last post by:
Hi, Requirement: Create Edit Forms dynamically i.e. at runtime in C#.net. The child contol(s) information e.g. no.of control, their type(lable/textbox), enabled/disabled etc. is coming from the...
6
blazedaces
by: blazedaces | last post by:
Hey, so here's an example of what I want to do: This "window" if you will, or simple gui, will accept an ArrayList<String> and in turn spit out for every one of them a checkbox and a text field...
2
JimWu
by: JimWu | last post by:
Do anyone know how to layout in Panel control. The code as follows labels.Text = "Album Name :"; labels.Text = "Title :"; labels.Text = "Tag :"; labels.Text = "Description :";
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.