I know it's not the known animation problem because the bar is already set to pbsPaused and SmoothReverse is true. The bar is called by a function which sends files over ftp. It looks like this:
function sendLists(FTP: TIdftp; cBox: TComboBox): Boolean; Overload; // this sends ALL lists from combobox to ftp server
var
i, k: Integer;
idList, resList, filesList: TStringList;
begin
Result:=TRUE;
resList:=TStringList.Create;
filesList:=TStringList.Create;
progress.fmBar.Init(filesList, 0, filesList.Count, 1);// this initiates the bar (files, min, max, step)
for i := 0 to cBox.Items.Count-1 do //comboBox has 4 items in
begin
for k := 0 to idList.Count-1 do
begin
if (something is true) then
resList.Add(idList[k]);
end;
resList.SaveToFile('temp.dat');
resList.Clear;
progress.fmBar.StepBar;//this should be called 4 times
FTP.Put('temp.dat', cBox.Items[i]+'-List.dat'); //the 4 files are sent successfully so that confirms 4 passes are being done.
end;
resList.Free;
filesList.Free;
FTP.Disconnect;
end;
And StepBar like this:
procedure Tfmbar.StepBar;
begin
pbMain.StepIt;
if pbMain.Position=pbMain.Max then btOk.Enabled:=TRUE;
pbMain.Update;
fmBar.Update;
end;
The labels correctly shows 100%, and I've tested the pbMain.Position and pbMain.Max both shows 4, which is in this case the number of files to send. I used this same function in another task and it updates perfectly. Maybe I'm missing something?