[Lazarus] Newbie

Milan Baša minkob at mail.t-com.sk
Sat Mar 5 19:02:29 CET 2011


Hi all.
I have this little code, but there is something i dont understand.
I have form with components progressbar, statictext, edit, stringgrid, 
spinedit +button.

One method:
procedure TForm1.Button1Click(Sender: TObject);
var i : smallint;
begin
      for i:=0 to 10 do
          begin
            progressbar1.Position:=i;
            statictext1.Caption:=inttostr(i);
            spinedit1.Text:=inttostr(i);
            stringgrid1.Cells[1,1]:=inttostr(i);
            edit1.Text:=inttostr(i);
            sleep(1000);
          end;

end;

Result after clicking on button:

winXP, lazarus 09.28.3:

Progressbar is working, statictext is increasing numbers but every other 
components are frozen til the time program stops and at this moment i 
can see everywhwere number 10.

PCLinuxOS 2010, 0.9.31:

I see no progress, only result 10.

What i am doing wrong?
Thank You.




More information about the Lazarus mailing list