[DUG] TTaskDialog with progress bar
Robert Martin
rob at chreos.co.nz
Fri Jul 11 13:17:31 NZST 2014
Hi
I have made some progress on this. I have it working by setting a flag
in the OnExpanded event (fExpanded := not fExpanded) and read that value
on the timer. Seems to work well. I am just trying to work out how to
do the same with the TMS component which I really want to use, it
provides support for XP whcih many still use.
Cheers
Rob
On 11/07/2014 9:44 a.m., Robert Martin wrote:
> 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
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at listserver.123.net.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with Subject: unsubscribe
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2014.0.4716 / Virus Database: 3986/7832 - Release Date: 07/10/14
>
>
More information about the Delphi
mailing list