[Lazarus] Some docking theory
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Sat Dec 20 06:26:26 CET 2008
On Fri, 19 Dec 2008, Mattias Gaertner wrote:
> On Fri, 19 Dec 2008 11:52:18 +0100
> Andrea Mauri <andrea.mauri.75 at gmail.com> 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.
As far as I know, in Delphi the statusbar updates immediatly, contrary to a label.
Michael.
More information about the Lazarus
mailing list