Stupid problem with Splitters and Docking

R

Rob Mayo

This is a stupid problem to have, but here goes.

I wanted to make like an Outlook-looking app. Multiple splitters, panes,
etc.
If I ...
1. Take a Form, add a TreeView, dock it Left.
2. Add a Splitter, dock it Left.
3. Add a ListView, dock it Full

....I have no problems, but If I...
1. Take a Form, add a Panel, dock it Left.
2. Add a splitter, dock it Left.
3. Add a secon Panel, dock it Full

I've got problems. :S
The only difference between the two procedures described above is using
Panels instead of TreeViews and ListViews.
The problem is that the second panel fills to the size of the entire Form,
not to the size of the splitter. The second panel seems to ignore the
splitter. The splitter seems to size the first panel correctly. I added
buttons to the second panel at (0,0) and they show up on the left side of
the form, rather than the immediate right of the splitter. I've brought the
second panel to the front and sent it to the back just to see the
difference.

Can anyone tell me why this is?
I feel like a dunce, not being able to figure this out becuase I've been
doing VB.Net for years and it's frustrating to be stuck on something so
stupid.

Any help is appreciated.
Thanx in advance,

WALDO
 
M

MstrControl

I've found Waldo!!! (Sorry... couldn't help myself :)

Jokes apart... you must remember, when adding panels to the form that
you must UNSELECT the panel in order to add more panels to the same
form. Because if you don't you'll add panel inside a panel, hence
producing the stange behavious you describe.

I've tried what you said on your post, and no problem arraised...

Regards,

Paulo
 
C

Chris Dunaway

Also, if a control that you have docked is hidden behind another
control try selecting it in the dropdown at the right and then choose
Bring To Front from the Alignment menu. Do this for any controls that
are not docked properly. This will often correct the problem.
 
M

MstrControl

One more thing... Not only Bring to Front or Send it to Back, the order
that the controls are stacked (from bottom up) states the order that
they will be docked.

Regards,

Paulo
 
R

Rob Mayo

That was it. The order in which I put them on the form was screwing with my
docking.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top