Layout manager issue when docking panels?  
Author Message
chiefjay





PostPosted: Wed Oct 29 00:42:57 CST 2003 Top

Visual C#.Net >> 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?

DotNet144  
 
 
Noah





PostPosted: Wed Oct 29 00:42:57 CST 2003 Top

Visual C#.Net >> Layout manager issue when docking panels? 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" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.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?
>


 
 
Lawrence





PostPosted: Wed Oct 29 09:37:04 CST 2003 Top

Visual C#.Net >> Layout manager issue when docking panels? 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]" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> 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" <EMail@HideDomain.com> wrote in message
> news:EMail@HideDomain.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?
> >
>
>


 
 
Kerry





PostPosted: Wed Oct 29 10:17:57 CST 2003 Top

Visual C#.Net >> Layout manager issue when docking panels? 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 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

 
 
Kerry





PostPosted: Thu Oct 30 01:42:47 CST 2003 Top

Visual C#.Net >> Layout manager issue when docking panels? >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.