954,529 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Populating a Listveiw

Hi,
I am trying to populate a listview with the data that is entered on the Edit box, but I am getting errors:

Form1.Listview.Insert(0);
Form1.Listview.Items.Item[0].Caption := Name{Name in the Diaolog Box)

Please help.

khipasi
Newbie Poster
5 posts since Dec 2009
Reputation Points: 10
Solved Threads: 0
 

Hi
By this code you can insert some items into List view

procedure TForm1.Button2Click(Sender: TObject);
Var
    ListItem:TListItem;
begin
    ListItem:=ListView1.Items.Add;
    ListItem.Caption:='Hello my friend';
end;
fayyaz
Junior Poster in Training
66 posts since Jun 2007
Reputation Points: 12
Solved Threads: 10
 

Thank you very much. It really helped.

khipasi
Newbie Poster
5 posts since Dec 2009
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You