[Lazarus] flickering on statusbar panel

Andrea Mauri andrea.mauri.75 at gmail.com
Fri Dec 19 16:57:58 CET 2008


Bug report created.
Andrae

Mattias Gaertner ha scritto:
> 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.
>
>
>   
>> 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
> 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/ 




More information about the Lazarus mailing list