Recent

Author Topic: TTaskDialog progress bar  (Read 718 times)

nimble2010

  • New Member
  • *
  • Posts: 14
TTaskDialog progress bar
« on: February 29, 2024, 05:04:37 pm »
How would you access the progress bar created on a TTaskDialog with the flag tfShowProgressBar during Runtime ?
The docs don't seem to mention it so I suppose it isn't exposed publicly nor in any of its parent classes.

https://lazarus-ccr.sourceforge.io/docs/lcl/dialogs/ttaskdialog.html

Thank you.

Bart

  • Hero Member
  • *****
  • Posts: 5465
    • Bart en Mariska's Webstek
Re: TTaskDialog progress bar
« Reply #1 on: February 29, 2024, 06:11:58 pm »
This only works in Lazarus main, and you access you access it in one of the events of the dialog.
E.g in OnTimer or OnButtonClicked.
There you can do something like:
Code: Pascal  [Select][+][-]
  1.    ...
  2.   (Sender as TTaskDialog).ProgressBar.SetRange(0,200);
  3.   (Sender as TTaskDialog).ProgressBar.Position := 25;

Bart

 

TinyPortal © 2005-2018