Jump to content
sjordi

VertScrollBox real size?

Recommended Posts

Hi,

I'm losing my nerves on something I thought would be simple.

I have TVertScrollBox aligning "client" to the main form in which I place other controls at creation time. Some of those controls are out of screen, much down there in the VertScrollBox.

Now my problem is that I need to know what is the full size of the VertScrollBox containing all the controls. 

By full size I mean even the non-visible part that can be revealed once one scrolls down.

 

I think I tried everything and always get the height of the visible part of VertScrollBox.

I tried its ViewPort, its Boundaries, Content.Height, Content.Boundaries, etc... each time the same result: the actual visible form size.

 

After looking around, someone facing the same problem suggested to calculate it myself while adding the controls, taking the further down one, get its vertical Y position, add its height and then I know what the height (bottom) of the VertScrollBox. 
It works. But I may be a purist, it looks to me to be just tinkering around like a fool.

How come there is no way to get the VertScollBox FULL size at each moment ? Or is it so obvious right under my nose that I don't see it?

Thanks for any light.

Steve 

Share this post


Link to post

Damn !

Of course I found the answer right after posting.

For those facing the same problem... 

VertScrollbox.ContentBounds.Height

 

// no comment

 

 

 

  • Like 1
  • Thanks 2

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×