Why don't Menus, Status Bars, etc. Decrease Form Client Area?

J

Joseph Geretz

I laid out all my form widgets based on this.ClientRectangle. I expected
that when adding a Menu this would decrement from the Form's client area,
since that's what I'm used to from my years of VB6 development. But this
didn't happen. So is the difference between the Form size and its
ClientRectangle simply the width of the border and the title bar? Shouldn't
controls which 'dock' such as Menu and Status Bar reduce the size of the
ClientRectangle as well?

Thanks for your advice.

Joseph Geretz
 
J

Jeff Gaines

I laid out all my form widgets based on this.ClientRectangle. I expected
that when adding a Menu this would decrement from the Form's client area,
since that's what I'm used to from my years of VB6 development. But this
didn't happen. So is the difference between the Form size and its
ClientRectangle simply the width of the border and the title bar?
Shouldn't controls which 'dock' such as Menu and Status Bar reduce the
size of the ClientRectangle as well?

You're correct about the ClientRectangle and it doesn't adjust for docked
controls, you need to do a few more calculations, sorry!
 

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