[fpc-pascal] TListBox bug in LCL of Lazarus?

Jürgen Hestermann juergen.hestermann at gmx.de
Thu Dec 11 18:39:18 CET 2008


Hi,

hopefully someone can help me with my first steps at migrating my Delphi 
programs to Lazarus.

I have a TListBox which I modify in the following way:
-------------------------------------------
with Form1.ListBoxAusgaben do
    begin
    Items.Add('aaaaaaaaaaa');
    Items.Strings[Count-1] := 'xxxxxxxxxxx';
    Items.Add('bbbbbbbbbbb');
    Items.Strings[Count-1] := 'yyyyyyyyyyy';
    ItemIndex := Count-1;
    Repaint;
    end;
-------------------------------------------
The result is that I get 3 lines with the first line being 'xxxxxxxxxxx' 
plus 2 empty lines. It seems that only the first ADD and the first 
aasignment to Strings[Count-1] is done but all following changes do not 
appear. Is this a bug in FP/Lazarus?

Jürgen Hestermann.




More information about the fpc-pascal mailing list