Ordering two controls that dock "top"?

B

Brett Romero

I have an MDI Parent form with a toolstrip and menustrip. The
menustrip is always the top most. Both are Docked to Top. I
contemplated using a toolstripcontainer but then removed it. I had to
redock my toolstrip and menustrip. Now the toolstrip is always top
most. I added a new MDI Parent form and can't find any differences.
How do I get the menustrip to be top most?

Also, is there a way to get the menu strip items (opening of a menu) to
be transparent, such as this:
http://www.windowsforms.net/WhidbeyFeatures/default.aspx?PageID=2&ItemID=14&Cat=Controls

Thanks,
Brett
 
L

Larry Lard

Brett said:
I have an MDI Parent form with a toolstrip and menustrip. The
menustrip is always the top most. Both are Docked to Top. I
contemplated using a toolstripcontainer but then removed it. I had to
redock my toolstrip and menustrip. Now the toolstrip is always top
most. I added a new MDI Parent form and can't find any differences.
How do I get the menustrip to be top most?

Between multiple controls that are Docked in the same place, it's the
Z-Order that decides the order they dock in. In the visual designer,
use (right click) Send to Back / Bring to Front; in code, use
Control.SendToBack / .BringToFront. It's not intuitively (to me,
anyway) obvious which way round is which, so play with it till it makes
sense :)

Also, is there a way to get the menu strip items (opening of a menu) to
be transparent, such as this:
http://www.windowsforms.net/WhidbeyFeatures/default.aspx?PageID=2&ItemID=14&Cat=Controls

You want the actual menu strip to be transparent? Hmm, don't think you
can do that. It might look a bit odd?
 
B

Brett Romero

Z-Order doesn't affect which control will dock top most.

I want the menu that opens when a user clicks a menu strip item to be
transparent. So no transparency until the user does something. The
actual always visible menu strip will remain non transparent. I think
you are correct though in that it cannot be done.

Thanks,
Brett
 
B

Brett Romero

I stand corrected. The one you want to be top most should have the
lower Z Order, which means furtherest back. It seems backwards to me
and I discovered it by accident.

Brett
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top