Question

I'm populating a self-made Windows Explorer which simulate the Microsoft Windows Explorer. This is the layout of my Windows Form: enter image description here

What I want it to be is: enter image description here

But when I maximized the windows, it looks like this:

enter image description here

The problem is that the treeView's width got increased, too. How to stop that ?

Any ideas? I've tried many ways but nothing works.

Était-ce utile?

La solution

Try to add a second splitcontainer around the groupbox and the splitcontainer you already have. Then set the panel at the bottom as the fixed panel.

Autres conseils

You can set the SplitContainer.FixedPanel property to disable automatic resizing of one of the panels. This way the specified panel will remain the same width/height even when the container itself is resized.

You could use Anchoring (each control will have that in the Properties menu), and select what you want it "anchored" to. That should allow your controls to stetch to fit the form.

It can be fiddly, so you have to anchor each control and think about how to wish to set it. EG to make a control extend if you increase the height of your form, click the top and bottom anchors.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top