[Lazarus] TListBox.AddItem doesn't exist?
John Landmesser
JohnML at online.de
Sun Oct 21 17:01:02 CEST 2012
Am 21.10.2012 16:25, schrieb Timothy Groves:
> So I am trying to add a TListBox to my program. Relevant code is below.
>
> TfrmFicMake = class(TForm)
> .
> .
> .
> lstVolumeList: TListBox;
> .
> .
> .
> end;
>
> procedure TfrmFicMake.btnAddVolumeClick(Sender: TObject);
> var
> index : integer;
> begin
> frmCreateVolume.ShowModal;
> lstVolumeList.Clear;
> for index := 0 to (Length (Volumes) - 1) do
> lstVolumeList.AddItem (Volumes [index].VolumeName);
> end;
>
>
>
> When I try to compile this, I get:
>
> mainform.pas(55,18) Error: identifier idents no member "AddItem"
>
>
> Now, I am almost certain, based on having perused the documentation,
> that TListBox contains a method called AddItem. What am I doing wrong?
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
just
ListBox1.Items.Add('myString)');
More information about the Lazarus
mailing list