[Lazarus] TProgressbar moves slowly, is there a hidden setting for faster response?

Bo Berglund bo.berglund at gmail.com
Thu May 16 12:02:43 CEST 2019


On Wed, 15 May 2019 17:20:04 +0200, Sven Barth via lazarus
<lazarus at lists.lazarus-ide.org> wrote:

>One possible workaround I found (not tested) is this:
>
>=== code begin ===
>
>YourProgressbar.Position := YourTarget;
>YourProgressbar.Position := Your Target - 1;
>YourProgressbar.Position := YourTarget;
>
>=== code end ===
>
>You first tell the progress bar your new desired target value (which
>triggers a slow animation), then you go one step back (which will enforce a
>fast redraw) and then to the target again (which again will be a slow
>animation, but shouldn't be that slow with only one point difference).
>
>Note: I currently don't know whether the property on TProgressBar is
>Position or Value. It's been a while since I last used one ;)
>
>Note 2: you can put similar code into the click handler, though there
>without the first step probably.
>

Before I saw this reply I had already tested successfully this
structure:

YourProgressbar.Position := YourTarget + 1;
YourProgressbar.Position := YourTarget;

And it really does work, no longer the animated slow move...


-- 
Bo Berglund
Developer in Sweden



More information about the lazarus mailing list