-2

I have a splitcontainer with 2 panels. In the first panel is a Treeview and a Datagridview in the other.

When I move the splitter, to be able to see more of the treeview, the Datagridview gets 'pushed' out of the wind

Darren Young
  • 10,972
  • 36
  • 91
  • 150

2 Answers2

4

You need to set the Dock property of the control in each pane to Full.

If you have multiple controls in a pane, you'll need to set their Dock or Anchor properties to achieve the behavior you want.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • 1
    and if you have, say, a status strip docked bottom and a datagridview docked full, then 'send to back' the status strip to stop the DGV from covering it (I know, this isn't very intuitive) – smirkingman Nov 15 '10 at 16:04
1

Minor point, but the dock style you want is Fill, not Full.

Ben
  • 1,321
  • 15
  • 30