[Lazarus] flickering on statusbar panel

Reenen Laurie rlaurie at gmail.com
Fri Dec 19 11:09:54 CET 2008


i:= 0;
while condition do
begin
 readln(f, str);
 label1.Caption:= Format('Number: %d', [i]);
 statusbar1.Panels[0].Text:= Format('Number: %d', [i]);
 Inc(i);
end;

If condition stays true, then statusbar will flicker continuously... (being
updated continuously)

you don't have an "exit" condition here (like "while not EOF(F) do")

Maybe this will help?

Also, just for information:
Which OS are you on, which version of that OS and which SVN version (or
Lazarus release version)?

Regards,
-Reenen



On Fri, Dec 19, 2008 at 11:17 AM, Andrea Mauri <andrea.mauri.75 at gmail.com>wrote:

>
> Mattias Gaertner ha scritto:
> > On Thu, 18 Dec 2008 14:58:58 +0100
> > Andrea Mauri <andrea.mauri.75 at gmail.com> wrote:
> >
> >
> >> But why, same monitor, same application, labels do not flicker while
> >> statusbar flickers?
> >>
> >
> > If statusbar text and properties do not change and it still flickers
> > when it is repainted, then there is a bug in the double buffering.
> > Please create a bug report.
> >
> > Mattias
> >
>
> As I wrote in my first e-mail in this thread the statusbar flickers when
> the text changes.
> This is what I wrote in my first e-mail:
>
> "
> Dear all,
> I encountered a flickering problem when using a statusbar under winxp
> (lazarus v0.9.27 r17839 i386-win32-win32/win64 fpc 2.2.2)
> Using a code similar to the following:
>
> i:= 0;
> while condition do
> begin
>  readln(f, str);
>  label1.Caption:= Format('Number: %d', [i]);
>  statusbar1.Panels[0].Text:= Format('Number: %d', [i]);
>  Inc(i);
> end;
>
> The text in the status bar panel flickers a lot while the same text in
> the label does not flicker.
> On Linux Ubuntu also the statusbar works fine.
> Another issue, but I am not sure because I made just some few tests, it
> seems that writing on the statusbar is a little slower than writing on a
> label.
> "
>
> So the text changes (not all the text, 'Number: ' string is fixed) in the
> statusbar, no other properties change.
> I encounter this problem only on windows. Labels work properly.
> Confirm that I have to create a bug report.
> Thanks,
> Andrea
>
>
> > _______________________________________________
> > Lazarus mailing list
> > Lazarus at lazarus.freepascal.org
> > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> >
> >
>
> --
> Dr. Andrea Mauri, PhD
> Milano Chemometrics and QSAR Research Group
> Department of Environmental Sciences
> University of Milano-Bicocca
> P.zza della Scienza, 1
> 20126 Milano - Italy
>
> Tel: ++39 02 64482801
> mailto:andrea.mauri.75 at gmail.com
> http://michem.disat.unimib.it/chm/
>
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>



-- 
o__
,_.>/ _
(_)_\(_)_______
...speed is good
_______________
I believe five out of four people have a problem with fractions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20081219/12f3cd5a/attachment-0007.html>


More information about the Lazarus mailing list