/*
AutoSize example
This example uses an edit box and a button on a form. When the user clicks the button, the font in the edit box enlarges, and the edit box enlarges also to accommodate the larger font size.
*/ 
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  Edit1->AutoSize = true;
  Edit1->Font->Size = 20;
  Edit1->Text = "The edit box is taller now";
} 
