ProgressBar Win32 Cgauge , , , , , .. :
Progressbar | CGauge | |
Max | MaxValue | (Position, Prog-ress), - . - − 100 |
Min | MinValue | (Position, Progress), - |
Position | Progress | , - , Min Min-Value , Max MaxValue . - , - − |
Smooth | ─ | ( true) |
Step | ─ | , Steplt. − 10 |
Orientation | ─ | : pbHorizontal− , pbVertical − . pbVertical, |
─ | ForeColor | |
─ | ShowText | |
─ | Kind | : gkHorizontalBar− - , gkVerticalBar − , gkPie − , gkNeedle − - , gkText − |
, − Position ProgressBar Progress CGauge. , Count, − Current, , (.. 0 100),
ProgressBar1->Position=100*Current/Count;
CGauge1->Progress=100*Current/Count;
ProgressBar CGauge.
: Count, Current. :
CGauge1->MaxValue=Count;
..
CGauge1->Progress=Current;
ProgressBar , : StepBy(Delta: Integer) − Delta, StepIt − , Step.
1. ProgressBar CGauge.
1. ( Windows), C++Builder 6, .
|
|
2. Caption ProgressBar CGauge. Panel1, Caption ProgressBar , , 18.
3. ProgressBar. Smooth true, − false. Orientation pbHorizontal, − pbVertical. .
4. Label1, Caption CGauge , , 18. CGauge, − . Kind gkText, gkHorizontalBar, gkNeedle, gkPie, gkVerticalBar. ForeColor -, ShowText − true, Font − , 18.
5. Button1, Caption , 18. ()
void __fastcall TForm1::Button1Click(TObject *Sender)
{
int count=1000;
ProgressBar2->Max=count;
ProgressBar2->Step=1;
for(int i=1;i<=count;i++)
{
ProgressBar1->Position=100*i/count;
ProgressBar2->StepIt();
CGauge1->Progress=100*i/count;
CGauge2->Progress=100*i/count;
CGauge3->Progress=100*i/count;
CGauge4->Progress=100*i/count;
CGauge5->Progress=100*i/count;
for(int j=0;j<100000;j++);
}
}
6. . , .