RAD Studio VCL Reference
|
Creates an instance of TProgressBar.
constructor Create(AOwner: TComponent); override;
virtual __fastcall TProgressBar(TComponent * AOwner);
Call Create to create a progress bar at runtime. Progress bars placed on forms at design time are created automatically.
AOwner is another component, typically the form, that is responsible for freeing the progress bar. It becomes the value of the Owner property.
C++ Examples:
/* Dynamically create a TProgressBar control and align it to the bottom of the form. */ #include <ComCtrls.hpp> #include <Controls.hpp> void __fastcall TForm1::Button1Click(TObject *Sender) { TProgressBar *ProgressBar = new TProgressBar(this); ProgressBar->Parent = this; ProgressBar->Align = alBottom; TButton *Button1 = new TButton(this); Button1->Parent = this; }
Delphi Examples:
{ Dynamically create a TProgressBar control and align it to the bottom of the form. } var I: Integer; procedure TForm1.Button1Click(Sender: TObject); var ProgressBar: TProgressBar; begin ProgressBar := TProgressBar.Create(Self); with ProgressBar do begin Parent := Self; Align := alBottom; end; end;
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|