//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "TProgressBarEx.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm14 *Form14;
//---------------------------------------------------------------------------
__fastcall TForm14::TForm14(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------

// BeginExample: TProgressBar
// Property: ParrentDoubleBuffered
// Property: Style
// Property: MarqueeInterval
// Property: BarColor
// Property: BackgroundColor
// Property: SmoothReverse
// Property: State
// Enumeration: TProgressBarState
// Enumeration: TProgressBarStyle

//BeginCode
/*
The following code shows an example of how to use the properties of a
TProgressBar type object.
*/

void __fastcall TForm14::FormCreate(TObject *Sender)
{
  ProgressBar1->BarColor = clRed;
  ProgressBar1->BackgroundColor = clGreen;
  ProgressBar1->ParentDoubleBuffered = True;
  ProgressBar1->Style = pbstMarquee;
  ProgressBar1->MarqueeInterval = 1000;
  Timer1->Enabled = False;
}
//---------------------------------------------------------------------------
void __fastcall TForm14::Timer1Timer(TObject *Sender)
{
  ProgressBar1->Position = ProgressBar1->Position + 10;
}
//---------------------------------------------------------------------------
void __fastcall TForm14::StartBTNClick(TObject *Sender)
{
	ProgressBar1->Position = 0;
	ProgressBar1->Style = pbstNormal;
	Timer1->Enabled = True;
	Timer1Timer(Timer1);
}
//---------------------------------------------------------------------------
void __fastcall TForm14::PauseBTNClick(TObject *Sender)
{
  if (ProgressBar1->State == pbsPaused)
	ProgressBar1->State = pbsNormal;
  else
	ProgressBar1->State = pbsPaused;
}
//---------------------------------------------------------------------------
void __fastcall TForm14::ErrorBTNClick(TObject *Sender)
{
  ProgressBar1->State = pbsError;
}
//---------------------------------------------------------------------------
void __fastcall TForm14::ReverseBTNClick(TObject *Sender)
{
  ProgressBar1->SmoothReverse = True;
}
//EndCode
//EndExample: TProgressBar
//---------------------------------------------------------------------------
