On Fri, 19 Dec 2008 11:52:18 +0100
Andrea Mauri <[email protected]> wrote:
> The code I wrote in the e-mail is just a sample!
> Anyway, create a new project, drop a label, a statusbar and a button
> on the form. Create a panel on the statusbar.
> On buttonclick drop the following code:
>
> procedure TForm1.Button1Click(Sender: TObject);
> var
> i: integer;
> begin
> i:= 0;
> while i < 10000 do
> begin
> // Application.ProcessMessages;
> label1.Caption:= Format('Number: %d', [i]);
> statusbar1.Panels[0].Text:= Format('Number: %d', [i]);
> Inc(i);
> end;
>
> Clicking on the button the text in the statusbar panel start to be
> updated, and it flickers. The text in the caption is updated only at
> the end of the while do cycle.
Great. There you have the bug. The statusbar should not update, just
like the label.
> If I uncomment the line Application.ProcessMessages both texts in
> label and in statusbar panel are updated during the while do cycle.
> The text in the label does not flicker while the text in the
> statusbar panel flickers.
It probably flickers because of above bug.
> I tested it on WinXP with lazarus v0.9.27 r17856
> i386-win32-win32/win64 and fpc 2.2.2
> The same code works on Linux with lazarus svn and fpc 2.2.2
> (statusbar and label do not flicker).
> I hope that I well explained the problem.
Yes, although I'm not a win32 intf developer. Please create a bug
report with the above example.
Mattias
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus