Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Resizing Panels with splitter control
 

Resizing Panels with splitter control

Hi
I am working on a .NET 2.0 win application. I have 3 panels on my Win Form. I have used 2 Splitter controls in between the Panels.

I want to Resize the panels with the splitter and the other panels should also adjust the size to cover the Form area.

I have tried to set the Dock and anchor property of the panels and splitter. Sometimes splitter becomes disabled or i am not able to resize the panel.

How to set the Dock and Anchor properties of Panel and Splitter controls so that the User can resize them?

Thanks
Ashok
Ashok K  Tuesday, March 31, 2009 2:27 PM

Hi Ashok K,

You can try the following steps:

Drag Panel1 to the Form, and set Dock to DockStyle.Left

Drag Splitter1 to next to Panel1, and set Dock to DockStyle.Left

Drag Panel2 to the Form, and Set Dock to DockStyle.Right.

Drag Splitter2 to the form next to Pane2, and set Dock to DockStyle.Right.

Drag Panel3 to the middle of the two splitter and set Dock to DockStyle.Fill.

I put there ListBoxes in each of the panel which we can get a clear clue.

If you have problem with the above steps:

You can download my test project here for reference.

If you have further problem, please feel free to let me know.

Best regards,

Bruce Zhou


Please mark the replies as answers if they help and unmark if they don't.
Bruce.Zhou  Thursday, April 02, 2009 1:29 AM

Hi Ashok K,

You can try the following steps:

Drag Panel1 to the Form, and set Dock to DockStyle.Left

Drag Splitter1 to next to Panel1, and set Dock to DockStyle.Left

Drag Panel2 to the Form, and Set Dock to DockStyle.Right.

Drag Splitter2 to the form next to Pane2, and set Dock to DockStyle.Right.

Drag Panel3 to the middle of the two splitter and set Dock to DockStyle.Fill.

I put there ListBoxes in each of the panel which we can get a clear clue.

If you have problem with the above steps:

You can download my test project here for reference.

If you have further problem, please feel free to let me know.

Best regards,

Bruce Zhou


Please mark the replies as answers if they help and unmark if they don't.
Bruce.Zhou  Thursday, April 02, 2009 1:29 AM

You can use google to search for other answers

Custom Search

More Threads

• Temporarily disable an event handler at runtime
• Adjusting Panel position and its members creates flashing effect
• Painting problems
• How to specify in NETCF custom DesignerSerializer for Form ?
• Mmicrosoft Outlook Integration with VB.NET Code
• property grid question
• Managed XHTML renderer
• Custom component selection problem
• How to copy the panel including controls and paste in the same form?
• Windows Control (Dont know the name)