tags:

views:

57

answers:

2

I have 3 buttons Docked to left but I want to put them in specific order like button1,button3,button2

But when I start dock them in the mentioned order button3 goes before button1!!!??

How can I maintain my own order??

+2  A: 

Try to change the Z-Order of the Buttons. Use SendToBack() or BringToFront().

SendToBack should move the button to the left side.

BringToFront should move the button to the right side.

Jehof
+2  A: 

Bring up the document outline window. (On my machine the hotkey is CTRL-W followed by U, otherwise find it in the View menu under "Other Windows").

The document outline window presents all of the form's child controls in a tree view.

You can move controls up and down the tree by selecting them and pressing the up and down buttons. This will change their docking order.

Andrew Shepherd
I find the document outline to be very helpful with forms that have many containers (TableLayoutPanel, GroupBox) docked inside each other.
Noam Gal