Display problem with my treeview and listview getting chopped off

G

Guest

My container with 2 panels containning Treeveiw and Listview controls are
chopped off on the top by the toolstripmenu when I dock the these 2 contols
in the parent container and the container is also docked to the parent, and
the container at this poit enlarges and covers up the toolstripmenu. If I
don't dock them then they don't resize when the form/container gets resize by
the user. I have a toolcontianer with menustrip and toolstrip. The
toolstrip is chopping off the top of my treeview and listvew controls but the
menustrip is fine.
Please help on how I can correct this. Thanks.
 
B

Bruce Wood

Pucca said:
My container with 2 panels containning Treeveiw and Listview controls are
chopped off on the top by the toolstripmenu when I dock the these 2 contols
in the parent container and the container is also docked to the parent, and
the container at this poit enlarges and covers up the toolstripmenu. If I
don't dock them then they don't resize when the form/container gets resize by
the user. I have a toolcontianer with menustrip and toolstrip. The
toolstrip is chopping off the top of my treeview and listvew controls but the
menustrip is fine.
Please help on how I can correct this. Thanks.

Select the container thta is covering up the tool strip menu and
right-click then select "Bring to Front". This should cause it to
correct its docking to take the toolstrip menu into account.

What you see is common if a container is first docked "Fill" and then
later another docked control is added to the parent. Docking occurs in
Z order, so the docked toolstrip must be "farther back" in the Z order
than the panel that is docked Fill, otherwise the panel fills the space
first, then the toolstrip is docked afterward, covering up the panel.
 
G

Guest

Thank you for the reply. It's the toolstripmenu that is covering up the top
part of my container and the 2 controls in it and not the other way around.

So, I'm still not sure what is the order that I should be docking all these
control to make them come up properly docked. Do you mind providing a little
more information. Thank you very much.
 
G

Guest

Do I need to put both the toolstripmenu and the menustrip into a
toolcontainer so it'll work properly? Right now they're not.
 
B

Bruce Wood

Now, you've got me there. I've never used ToolStripMenu, myself.

All I know is that if you have multiple controls docked in a container,
they dock in order, from back to front, so the control that is docked
"Fill" must be the frontmost.
 
G

Guest

I tried palying with it wit differnt order of docking the contols but no
change. But thanks anyway.
 
G

Guest

Ok, I got it resolved finally. I first shrik the container and the 2 donrols
in it to below the menustrip with a good size gap for me to insert the
toolstripmenu later. I had to select the container, the treeview and the
listivew controls and select "cut" I then insert the toolstripmenu below the
menustrip and dock to top(it's default). I now past bac the 3 controls and
select to dock the container to parent and now it's working as it should.
 

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