Jump to content
Andry

How to get exact Control ClientWidth and ClientHeight

Recommended Posts

Hi all,

I have to get the exact ClientWidth and ClientHeigth of a VCL control (TPannel) docked in a form to position some controls within a loop within a method.

The form is fixed at wsMaximized at designtime but when I run the application, I cannot have the ClientWidth and ClientHeigth of the control, instead, I have the ClientWidth and ClientHeigth of the control like as designtime even if the form is maximized in runntime.

So when is the best moment to get theses properties to do execute the method.

Regards

Andry

Share this post


Link to post
18 minutes ago, Andry said:

 the ClientWidth and ClientHeigth of the control like as designtime

You can override the form's Loaded method.

At that point the values of the control will be those stored in the DFM.

 

 

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

×