Groups | Blog | Home
all groups > c# > june 2005 >

c# : split view help in VS 2005


John Salerno
6/30/2005 9:30:53 PM
I followed some simple steps in a magazine to create a Form with a split
view, but it doesn't look right. First I added a ListView control and
docked it to the left, then I added the Splitter control, then I added a
TreeView and docked it with fill.

When I run the window, it shows a big grey area in the center of the
form and I can resize the right edge of it. How can I make it so that
there is only a single line that can be used to resize the other two
Nicholas Paldino [.NET/C# MVP]
7/1/2005 2:09:33 PM
John,

In .NET 2.0, there is a much easier way to handle split controls. There
is a SplitContainer control in the toolbox which has two sub-panels that you
can place your controls in (and fill the area with them, if you wish). It
will handle all of the split management for you, and is much easier to set
up.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com

[quoted text, click to view]

John Salerno
7/1/2005 5:02:00 PM
[quoted text, click to view]

This is what I'm using, but it doesn't look right. Perhaps the
instructions I followed were incorrect, but what results is a panel on
the left, one on the right, and big area in the middle that is part of
the split container but doesn't do anything. There isn't just a single
AddThis Social Bookmark Button