Why can't I get the right control height?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

what are you trying to accomplish here? what version of visual studio are you
using? in 2005 theres a property that allows you to fill an object completely
in the form, if that helps
 
Hi all,

Can someone take a look at the below code and see if you can tell me why
the control just cannot have a height that reaches the bottom of the form.
It always exceeds it by a value of 70 or so.

This is within a form.

Thanks,
Adam
tvSelectFolder.Top = (MenuStrip1.Size.Height + ToolStrip1.Size.Height) + 5
(THIS WORKS)

tvSelectFolder.Height = Me.Size.Height - (MenuStrip1.Size.Height +
ToolStrip1.Size.Height + StatusStrip1.Size.Height + 5) (THIS DOES NOT WORK
PROPERLY)
 
I fixed it.

I needed to use clientsize instead of height for the form value.

I wanted to expand the controls on the form when its scales by the user. I
found using the panel and split container voids the menustrip from scaling
properly hence wanted to just go ahead and write my own code to handle it.

Vesion 2005 Pro.

Thanks,

Adam
 
I wanted to expand the controls on the form when its scales by the user. I
found using the panel and split container voids the menustrip from scaling
properly hence wanted to just go ahead and write my own code to handle it.

Are you using Anchor and Dock correctly?
 
I believe so. I tried various combinations and it just wouldn't listen.

Adam
 

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

Back
Top