Listview1.items as standard Tlistitems class
Listview1.items
(1) Assigning value
with ListView1.Items.Add do
begin
Caption:=caption; //添加第一项
SubItems.add(aaaaa); //添加后面数据
SubItems.add(1234);
SubItems.add(1234);
end; //一定要使用WITH结构.
(2) Take value
ListView1. Items.item[i]. Caption get a title of a piece of data
ListView1. Items.item[i]. SUBITEMS.STRINGS[J] Get a piece of data content
ListView1. Items.item[i].subitems.commatext the entire contents of a single record,
Format: "title", "Content 1", "Content 2",....
ListView1. Items.item[i]. Subitems.text the entire contents of a single record,
Format: Title, content, Content 2 ....
(3) Delete
ListView1. Items.item[i]. Delete; Delete a piece of data
(4) Definition of data type (length)
I:=listview1.items.count Number of data bars
ListView1. Items.item[i]. Selected this piece of data is selected (MultiSelect select check)
(5) Other
ListView1.Items.Clear; Purge data