panel resize

Posted by Freddy Boisseau on 10-Oct-2008 15:43

I want to create a panel that is docked to the left side of a form. I then want the user to be able to increase the width of the panel using the mouse. How do I do that?

All Replies

Posted by Admin on 10-Oct-2008 15:46

Using a splitter docked left next to the panel.

Posted by rbf on 10-Oct-2008 15:47

You would use a splitcontainer instead.

Posted by Admin on 10-Oct-2008 15:50

The Splitter works just as fine.

If the Form would be a MDI Container, you need to use the Splitter (not the SplitContainer). Otherwise the clientarea of the Form would be overlapped by the SplitContainer panels.

Posted by rbf on 10-Oct-2008 15:58

Interesting. Did not even know a separate splitter existed, since it is not included in the toolbox by default.

Posted by Admin on 10-Oct-2008 16:10

I did not mean to cheat. Sorry.

Know both Splitter variants. Both have their reason to be there. The SplitContainer makes it easy to build a new container, embed it into each other etc. The simple Splitter simply enables the resizing of a single controls. That's controlled by a common dock value.

Posted by rbf on 10-Oct-2008 16:24

Thanks that's good to know.

Posted by Freddy Boisseau on 13-Oct-2008 09:43

Okay, I found the splitter, but I can not figure out how to use it. Does anyone have an example of how to this control is used from the visual designer?

Thank you.

Posted by Freddy Boisseau on 13-Oct-2008 10:55

I have figured it out. The steps I took to make it work was as follows.

1) Added a panel to my form and dock it on the left.

2) The add the splitter and dock it to the left.

I the main confusion I was having was working around stuff I had in the from from my previous work.

This thread is closed