[DUG] TTaskDialog with progress bar
Robert Martin
rob at chreos.co.nz
Fri Jul 11 09:44:53 NZST 2014
Hi
I have been trying to build a TTaskDialog that shows the progress of an
Http download. I want to have it so the user can click the extra
details button and see file size, downloaded amount and download speed.
All of the above works, however for some reason changing the
.ExpandedText (to update the display) in the OnTimer seems to auto
expand the detail (the user doesn't have to clcik for more detail) and
the contract button disappears. If I don't update the .ExpandedText
everything works ok.
I tried the code below
//test code
procedure TForm2.TaskDialog1Timer(Sender: TObject; TickCount: Cardinal;
var Reset: Boolean);
begin
if (TaskDialog1.Expanded = True) then begin
TaskDialog1.ExpandedText := TaskDialog1.ExpandedText + 'a';
end;
TaskDialog1.ProgressBar.Position :=
TaskDialog1.ProgressBar.Position + 1;
end;
However the TaskDialog1.Expanded never seems to get set to true, no
matter how many times I expand or hide the detail.
Any ideas where to go? The Delphi help on this stuff is terrible and
there doesn't seem to be much on the web with respect to progressbars
and callbacks.
p.s. I also have the TMS version of this component which seems to
perform identically, it has the same fault but doesn't even seem to have
the .Expanded property.
Cheers
Rob
More information about the Delphi
mailing list