TCustomEditAutoSize (C++)

From RAD Studio Code Examples
Jump to: navigation, search

Description

This example uses an edit box and a button on a form. When you click the button, the font in the edit box enlarges; the edit box enlarges also to accommodate the larger font size.

Code

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  Edit1->AutoSize = true;
  Edit1->Font->Size = 20;
  Edit1->Text = "The edit box is taller now";
}

Uses