RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TPropertyPage.ClientHeight Property

Specifies the height (in pixels) of the form's client area.

Pascal
property ClientHeight: Integer;
C++
__property int ClientHeight;

Use ClientHeight to determine the height (in pixels) of the form's client area. The client area is the usable area inside the form's border, excluding the title bar, scroll bars, and so on. 

Set ClientHeight to change the height of the form's window based on the desired client area. To change the height of the form's window based on the total size of the window (including the border, menu, status bar and so on), use the Height property instead.  

C++ Examples: 

 

/*
This example reduces the height of the form's client area by
half when the user clicks the button on the form:
Note that only the client area is halved, not the entire form.
*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  Form1->ClientHeight = Form1->ClientHeight/2;
}

 

Delphi Examples: 

{
This example reduces the height of the form's client area by
half when the user clicks the button on the form:
Note that only the client area is halved, not the entire form.
}
procedure TForm1.Button1Click(Sender: TObject);
begin
  ClientHeight := ClientHeight div 2;
end;

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!