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

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Dec 11 19:24:47 CET 2008


On Thu, 11 Dec 2008 18:39:18 +0100
J├╝rgen Hestermann <juergen.hestermann at gmx.de> wrote:

> 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?

Maybe. Please create a bug report with a complete example.

Mattias



More information about the fpc-pascal mailing list