Home Forums WinForms controls Other WinForms controls DockLayoutManager and Toolbar Reply To: DockLayoutManager and Toolbar

User (Old forums)
Member
Post count: 23064

When using “adorner” controls such as a MenuBar or a StatusBar, you need to use 2 different panels for DockHost and ClientHost.

For example, you might have :

FormMain <– Used as the DockHost
smartMenuBar1 <– DockStyle.Top
myDockedContainer1 <– DockStyle.Fill, used as the ClientHost

You would need to add one panel as a child of myDockedContainer1 and designate the DockHost and ClientHost like this:

FormMain
myDockedContainer1 <– DockStyle.Fill, used as the DockHost
myDockedContainer2 <– Used as the ClientHost
smartMenuBar1 <– DockStyle.Top

Also, note that you will need to do a “Bring to front” on myDockedContainer1 to have it positioned below the smartMenuBar1 instead of under it. (this is the way Windows Forms layouts controls according to their Dock property)

Imported from legacy forums. Posted by Matt (had 442 views)