
10-05-2023, 22:09
|
 |
Registered User
|
|
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
|
|
Quote:
Originally Posted by audiofeel
@BLACKFIRE. Hello. FMemo does not work as I would like. Everything is fine, except that when a new archive starts, there is an empty line after Unpacking. I will provide part of the code below.
What am I doing wrong? It will be useful to many, I think.
Code:
function ProgressCallback(OverallPct, CurrentPct, DiskTotalMB, DiskExtractedMB: integer; DiskName, CurrentFile, TimeStr1, TimeStr2, TimeStr3, Speed: WideString): longword;
var
S: WideString;
begin
S:= 'Unpacking: ' + CurrentFile;
if Page2Memo.LineStrings(Page2Memo.LineCount - 1) <> S then
begin
Page2Memo.AddLine(S);
end;
Result:= ISArcExCancel;
end;
|
have you tried this?
Code:
function ProgressCallback(OverallPct, CurrentPct, DiskTotalMB, DiskExtractedMB: integer; DiskName, CurrentFile, TimeStr1, TimeStr2, TimeStr3, Speed: WideString): longword;
var
S: WideString;
begin
S:= 'Unpacking: ' + CurrentFile;
if (length(CurrentFile) > 0) and (Page2Memo.LineStrings(Page2Memo.LineCount - 1) <> S) then
begin
Page2Memo.AddLine(S);
end;
Result:= ISArcExCancel;
end;
|