Delphi has two button the first to add data to the Listview first and second col

Delphi has two button the first to add data to the Listview first and second column second how to add data to the third column
Add third columns do not cover the first and second columns of content


Started by Cassie at February 01, 2016 - 12:52 PM

ListView1.Items[0].SubItems.Add(button2.Caption);

Posted by Harry at February 13, 2016 - 1:06 PM

Posted by Cassie at January 01, 2017 - 11:42 AM

The first and second columns is from a lot of data into the database cannot modify the third column is added to the data users
The listview table is 1, the 2 column cannot modify the third row from the first row to add data, which cannot be added. . .
Add a guild to go all the way down

Posted by Cassie at January 08, 2017 - 11:53 AM


procedure TForm1.button1Click(Sender: TObject);
var
item: TListItem;
begin
item := ListView1.Items.Add;
item.Caption := IntToStr(ListView1.Items.Count);
item.SubItems.Add(button1.Caption);
end;

procedure TForm1button2Click(Sender: TObject);
begin
ListView1.Items[ListView1.Items.Count - 1].SubItems.Add(button2.Caption);
end;

Posted by Harry at January 10, 2017 - 10:20 AM

You have to understand the structure of listview

Posted by Harry at January 13, 2017 - 10:57 AM