RAD Studio VCL Reference
|
Specifies the vertical size of the control in pixels.
property Height: Integer;
__property int Height;
Use the Height property to read or change the height of the control.
C++ Examples:
/* This example needs only a blank form. Three Rich Edit controls are placed vertically on the form, each contain a line of text, and the second form has HideSelection set to false. Try tabbing between the three Rich Edit controls and observe the effect on the selected text. */ #include <ComCtrls.hpp> void __fastcall TForm1::FormCreate(TObject *Sender) { for (int I = 0; I <= 2; I++) { TRichEdit *pRich = new TRichEdit(this); pRich->Parent = this; pRich->Top = pRich->Height * I; pRich->Text = "This text will take the focus."; pRich->SelStart = 0; pRich->SelLength = pRich->Text.Length(); if (I == 1) pRich->HideSelection = false; } }
Delphi Examples:
{ This example needs only a blank form. Three Rich Edit controls are placed vertically on the form, each contain a line of text, and the second form has HideSelection set to false. Try tabbing between the three Rich Edit controls and observe the effect on the selected text. } uses ComCtrls; procedure TForm1.FormCreate(Sender: TObject); var I: Integer; begin for I := 0 to 2 do with TRichEdit.Create(Self) do begin Parent := Self; Top := Height * I; Text := 'This text will take the focus.'; SelStart := 0; SelLength := Length(Text); if (I = 1) then HideSelection := False; end; end;
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|