C#,Delphi,Oracle,MSSQL 개발자블로그

델파이 프로그래스바 ProgressBar 본문

Programming/Delphi

델파이 프로그래스바 ProgressBar

19760323 2019. 6. 12. 19:57

프로그래스바의 동작방식은, 루프를돌며 1씩 증가시켜주는 것이다.

 

프로그래스바의 처음(Position)과 끝(Max)을 각각 정하고, 어떠한 작업이 끝날 때 마다(루프가 한번 돌 때 마다)

 

Position을 1씩 증가시키면 된다.

 

procedure TForm1.Button4Click(Sender: TObject);
var
   iRow : Integer;
begin
   prg.Position := 0;
   prg.Max := 10000;

   for iRow := 0 to 10000 - 1 do
   begin
       prg.Position := prg.Position +1;
   end;
end;

Comments