Z-order on my custom control at design-time is wrong
- From: "Lee Grissom" <lee dot grissom at quest dot com>
- Date: Thu, 1 Feb 2007 14:14:55 -0800
I've created a very simple custom "UserControl" that has a Panel docked to
the top. I've decorated my custom control with the:
[Designer(typeof(System.Windows.Forms.Design.ScrollableControlDesigner))]
attribute so that I can drop other controls onto it when used elsewhere.
So, I go ahead and drop my custom usercontrol onto a Form, and then drop two
buttons onto the usercontrol. So far, so good. Now, I want to set the Dock
properties of the buttons to Right and Fill. Yes, I know that's silly, but
follow me.
At this point, notice that the Z-ordering is incorrect, such that the top
panel is now covering the button that was set to Fill. Also notice that the
right button ignores the precedence of the Top panel. I can fix it by
right-clicking on the two buttons and changing their Z-order (right-first,
bring to front, fill-second, bring to front). BUT... when I close the form
and re-open it. The Z-order has reverted back to it's original state of
being messed up.
Any ideas on how I can fix this?
--
Lee
.
- Follow-Ups:
- Re: Z-order on my custom control at design-time is wrong
- From: Lee Grissom
- Re: Z-order on my custom control at design-time is wrong
- From: Lee Grissom
- Re: Z-order on my custom control at design-time is wrong
- From: Lee Grissom
- Re: Z-order on my custom control at design-time is wrong
- Prev by Date: Re: Can't drop a control onto my user control
- Next by Date: How to search in a grid
- Previous by thread: Can't drop a control onto my user control
- Next by thread: Re: Z-order on my custom control at design-time is wrong
- Index(es):
Relevant Pages
|