Docking of controls

  • Thread starter Tor Inge Rislaa
  • Start date
T

Tor Inge Rislaa

Docking of controls

I have a ToolBar on top of my form. The property Dock is set to Top. Beneath
that I have a Panel as have the same Dock setting set to Top. The panel is
Beneath the ToolBar because the ToolBar was inserted to my form as the first
of the two controls. How can I change the position of these controls after
the design is made? I would prefer not to set the Dock property to none,
because it effects the docking of controls beneath these two controls.

In other words, is there a way to control which control is the topmost of
two controls, both with it's dock property set to top?

TIRislaa
 
H

Herfried K. Wagner [MVP]

Tor Inge Rislaa said:
In other words, is there a way to control which control is the topmost of
two controls, both with it's dock property set to top?

Take a look at the controls' 'BringToFront' and 'SendToBack' methods and the
according context menu entries in the Windows Forms designer.
 
T

Tor Inge Rislaa

The problem is not that the controls are covering each other. More of the
kind concerning the .top and .left possition of the control.

TIRislaa
 
H

Herfried K. Wagner [MVP]

Tor Inge Rislaa said:
The problem is not that the controls are covering each other. More of the
kind concerning the .top and .left possition of the control.

'BringToFront' and 'SendToBack' can be used to change the docking order, for
example:

A
B

=>

B
A
 

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