What is the difference between the Height and ClientHeight properties of a TForm?

8

In Delphi a Form has 2 properties to set its height: Height and ClientHeight . But what is the difference between the Height and ClientHeight properties of a TForm?

    
asked by anonymous 30.10.2014 / 19:45

1 answer

10

Height is the height of the form itself. It counts for example the title bar and the upper and lower borders.

ClientHeight is the height available for child components of the form.

For example, if the height of a modal form is limited to the ClientHeight size of the main form, and this modal form is vertically aligned in the center of the main form, you can still see the title bar of the main form via the modal form.

You can set ClientHeight to determine how much space you want for child components, but the most common use is read this property to delimit the size of child components or the size of modal forms.

    
30.10.2014 / 19:54