Mam taki kod:
memo1.Text:= StringReplace(Edit1.Text, '0', '1',[rfReplaceAll, rfIgnoreCase]);
Jak pokazać ten proces na progressbar?
Dzieki
Mam taki kod:
memo1.Text:= StringReplace(Edit1.Text, '0', '1',[rfReplaceAll, rfIgnoreCase]);
Jak pokazać ten proces na progressbar?
Dzieki
Zastąp StringReplace jakąś własną funkcją...
a co robi ta funkcja ?
ehhh, spróbuj tak:
var i:integer;
progressbar.max:=memo1.Lines.Count;
for i:=0 to memo1.Lines.Count-1 do
begin
if memo1.text[i]='0' then memo1.text[i]:='1';
progressbar.position:=i;
Application.ProcessMessages;
end;
ehhh, spróbuj tak:
var i:integer;
progressbar.max:=memo1.Lines.Count;
for i:=0 to memo1.Lines.Count-1 do
begin
if memo1.text[i]='0' then memo1.text[i]:='1';
progressbar.position:=i;
Application.ProcessMessages;
end;
a nie powinno być:
progressbar.max:=length(memo1.Text);
for i:=0 to length(memo1.Text) do
begin
if memo1.text[i]='0' then memo1.text[i]:='1';
...
???