all groups > c# > april 2004 >
You're in the

c#

group:

Simple Question on Docking Settings?



Simple Question on Docking Settings? Peter
4/30/2004 7:36:02 PM
c#: Hello

Thanks for reviewing my question. I have a simple question. I would like to know how you can arrange the docking order? For example, when I add a toolbar and I set the dock to TOP and then add a listview and set its dock to LEFT, the listview goes to left top to left bottom and my toolbar is now smaller because it was pushed over by the listview. What I want is to have toolbar top left to top right and the listview's top starting at the place below the toolbar to the bottom of the form. (I hope explained it clearly.

Many Thanks to the Exper
Re: Simple Question on Docking Settings? C# Learner
5/1/2004 10:11:41 AM
[quoted text, click to view]

<snip>

[quoted text, click to view]

This doesn't happen here. When I set the ListView's Dock to Left, the
ToolBar doesn't resize at all.

Can you give exact instructions on how to replicate the problem?

Re: Simple Question on Docking Settings? Morten Wennevik
5/1/2004 11:05:20 AM
Hi Peter,

You can try using panels. Put a panel with DockStyle.Fill beneath your
toolbar, and the ListView inside that panel.

Happy coding!
Re: Simple Question on Docking Settings? Bern Taylor
5/1/2004 1:03:33 PM
This is controlled by the order the controls are added to the form:

this.Controls.AddRange(new System.Windows.Forms.Control[]
{this.listView1,this.toolBar1});

Change the order to {this.toolBar1, this.listView1} and you will change
the effect.

Bern


[quoted text, click to view]
to know how you can arrange the docking order? For example, when I add a
toolbar and I set the dock to TOP and then add a listview and set its dock
to LEFT, the listview goes to left top to left bottom and my toolbar is now
smaller because it was pushed over by the listview. What I want is to have
toolbar top left to top right and the listview's top starting at the place
below the toolbar to the bottom of the form. (I hope explained it clearly.)
[quoted text, click to view]

AddThis Social Bookmark Button