TControlAlign (C++)

From RAD Studio Code Examples
Jump to: navigation, search

Description

Dynamically create a TProgressBar control and align it to the bottom of the form.


Code

#include <ComCtrls.hpp>
#include <Controls.hpp>

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  TProgressBar *ProgressBar = new TProgressBar(this);  // The owner will clean this up.
  ProgressBar->Parent = this;
  ProgressBar->Align = alBottom;
  TButton *Button1 = new TButton(this);  // The owner will clean this up.
  Button1->Parent = this;
}

Uses