/*
MultiLine, Checked example
This example requires a PageControl with no pages created, and a TCheckBox. During the form create, a series of tabs will be created on the Page Control that exceed the Page Control's width.  When the Check Box control is clicked, the setting of the MultiLine property is toggled, alternately stacking the tabs vertically, or along a single line horizontally.
*/ 
void __fastcall TForm1::CheckBox1Click(TObject *Sender)
{
  PageControl1->MultiLine = CheckBox1->Checked;
}

void __fastcall TForm1::FormCreate(TObject *Sender)
{
  Checkbox1->Caption = "Stack Tabs?";
  for (int i = 0; i < 20; i++)
  {
    TTabSheet *pPage = new TTabSheet(PageControl1);
    pPage->PageControl = PageControl1;
    pPage->Caption = AnsiString("Page") + IntToStr(i);
  }
} 
