On Wed, 1 Feb 2006, A.J. Venter wrote:
Hi all,
Why is it that I cannot seem to get my progressbar to update ¨live¨
I am trying to show the progress of decompressing files when the user selects
a multifile book in OpenBook.
The code is like this (hugely snipped)
extractpb.position := 0;
For I := 1 to FileLIst.Count -1 do
Begin
extractpb.Position := percentage(I + 1,FileList.Count
end;
This all gets called from a procedure OUTSIDE the form class simply called
decompress.
What happens however is that when I trigger the process, the read book button
stays depressed, and the progressbar neatly on 0 until the book is actually
OPEN, only then does the form update.
I tried to put an invalidate call after setting position - no luck.
Surely I don`t need a thread just to do a progressbar ? After all, I am not
updating it on the progress PER FILE but in between on the progress of how
many files are done, shouldn`t that be a fairly simple process ?
Any help as always, greatly appreciated.
After
extractpb.Position := percentage(I + 1,FileList.Count
add
Application.ProcessMessages;
Michael.