Home All Groups Group Topic Archive Search About

Why can't I get the right control height?

Author
13 Apr 2006 1:24 AM
Adam Honek
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)

Author
13 Apr 2006 12:37 AM
iwdu15
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
--
-iwdu15
Author
13 Apr 2006 1:45 AM
Adam Honek
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

Show quoteHide quote
"iwdu15" <jmmgoalsteratyahoodotcom> wrote in message
news:567B408A-C572-410B-BB43-945989193527@microsoft.com...
> 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
> --
> -iwdu15
Author
13 Apr 2006 2:18 AM
Homer J Simpson
"Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> wrote in message
news:%23oajhOpXGHA.1196@TK2MSFTNGP03.phx.gbl...

> 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?
Author
13 Apr 2006 3:39 AM
Adam Honek
I believe so. I tried various combinations and it just wouldn't listen.

Adam

"Homer J Simpson" <nob***@nowhere.com> wrote in message
news:6yi%f.72461$%H.17248@clgrps13...
Show quoteHide quote
>
> "Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> wrote in message
> news:%23oajhOpXGHA.1196@TK2MSFTNGP03.phx.gbl...
>
>> 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?
>
>
>