 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Jens Guest
|
Posted: Sat Mar 06, 2004 12:46 pm Post subject: My Own Bar |
|
|
I am trying to make my own bar with 2 labels, what am I doring wrong here.
//////////////
private
{ Private declarations }
public
{ Public declarations }
bary, barx : integer;
barw : Double;
barr : extended;
end;
/////////////
procedure TForm1.IdTCPClient1WorkBegin(Sender: TObject;
AWorkMode: TWorkMode; const AWorkCountMax: Integer);
begin
if AWorkMode = wmWrite then
begin
barx := AWorkCountMax;
Label2.Width := 0;
end;
end;
procedure TForm1.IdTCPClient1Work(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCount: Integer);
begin
bary := AWorkCount;
if bary < barx then
begin
barw := (bary / barx) * 100;
barr := barw * (label1.Width / 100);
label2.Width := strtoint(FormatFloat('0' , barr));
End;
end;
procedure TForm1.IdTCPClient1WorkEnd(Sender: TObject;
AWorkMode: TWorkMode);
begin
label2.Width := label1.Width;
end;
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Sat Mar 06, 2004 11:11 pm Post subject: Re: My Own Bar |
|
|
"Jens" <til (AT) infojens (DOT) dk> wrote
| Quote: | I am trying to make my own bar with 2 labels,
what am I doring wrong here.
|
You need to provide more details. What do you expect it to do, and what is
it actually doing instead?
Gambit
|
|
| Back to top |
|
 |
Jens Guest
|
Posted: Sun Mar 07, 2004 11:15 am Post subject: Re: My Own Bar |
|
|
I whant to make my own bar just like the ProgressBar
I don't whant to use the ProgressBar because I can't change the color on it
!
I try to use 2 labels, one there have the width that I whant the bar to
have, and one that becomes more width doring the copy of the file !
When label2.width is the same as label1.width then the copy is finished.
/ Jens
"Remy Lebeau (TeamB)" <gambit47.no.spam (AT) no (DOT) spam.yahoo.com> wrote
| Quote: |
"Jens" <til (AT) infojens (DOT) dk> wrote in message
news:4049c809 (AT) newsgroups (DOT) borland.com...
I am trying to make my own bar with 2 labels,
what am I doring wrong here.
You need to provide more details. What do you expect it to do, and what
is
it actually doing instead?
Gambit
|
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Sun Mar 07, 2004 10:57 pm Post subject: Re: My Own Bar |
|
|
"Jens" <til (AT) infojens (DOT) dk> wrote
| Quote: | I don't whant to use the ProgressBar because I can't change the color on
it
!
|
Yes, you can. Send the ProgressBar a PBM_SETBARCOLOR message.
Gambit
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|