1
votes

I have a two panel, panel1 is a form and panel2 is a command.

panel1 I enable auto scroll to true, and dock is fill

panel2 I set auto scroll false, and dock is right

I add splitter in right of panel1 and when running the program, the result is:

enter image description here

The scroll vertical place in the right and scroll horizontal also drag panel 2 too.

I want the form splitcontainer to be like this:

enter image description here

How to do that without using splitcontainer, only splitter and two panels?

2

2 Answers

1
votes

You can do the following in order:

  1. panel1.Dock = DockStyle.Left;
  2. splitter1.Dock = DockStyle.Left;
  3. panel2.Dock = DockStyle.Fill;

If you added your controls in the order different from panel1, splitter1, panel2, you can do the following to re-order them:

  1. Select panel1, right-click -> Bring to Front
  2. Select splittler1, right-click -> Bring to Front
  3. Select panel2, right-click -> Bring to Front
2
votes

you first add split container to form then in panel one of split container add simple panel and set few property of that panel to

1: auto scroll to true.

2: dockstyle to fill

you will get the desired output..