Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
void __fastcall TForm1::FormCreate(TObject *Sender)
{
TButton *Btn;
//NumBtns is the number of buttons to create
for (unsigned int i = 0;i<NumBtns();i++)
{
Btn = new TButton(this);
AnsiString btnNum = i;
Btn->Name = "Btn"+ btnNum;
Btn->Caption = Btn->Name;
Btn->OnClick = TestClick;
// TestClick is an event function; you can assign it later
// but make sure you assign an evcent function to a button
// before the user can click it
this->InsertControl(Btn);
Btn->Top = i * (Btn->Height);
Btn->Width = Btn->Width *2;
NumLines = i+1;
};
this->Height = (NumLines +1) * ((Btn->Height)+1);
}