[Lazarus] TListBox.AddItem doesn't exist?

Timothy Groves the.tail.kinker at gmail.com
Sun Oct 21 16:25:41 CEST 2012


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?




More information about the Lazarus mailing list