3

I want the user to adjust the splitter... I have two sides in the winform: one shows the people and the other shows the details about them. I want the user to be able to move the spliter, to adjust how much he wants of the each side of the form to be seen.

How do i achieve that?

David Hall
  • 32,624
  • 10
  • 90
  • 127
Dmitry Makovetskiyd
  • 6,942
  • 32
  • 100
  • 160

1 Answers1

8

Use the SplitContainer class:
http://msdn.microsoft.com/en-us/library/system.windows.forms.splitcontainer.aspx

Move your "People" List in the left splitcontainer panel and the detail view into the right panel. Be careful when Cut & Pasting your controls. VS2008 looses all event handlers when moving control to the clipboard. (Don't know about VS2010).

Split containers allow you to set a fixed panel - a panel that does not auto-resize when the view bounds change. This is probably your "People" list.

Thomas Zoechling
  • 34,177
  • 3
  • 81
  • 112