473,320 Members | 1,861 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,320 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 6369
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.