I'm a Delphi Dabbler Using Delphi XE8 and a TListView
This has probably been asked before but none of the answers I've seen helped.
I have a list of websites. 2 columns.
i.e
SHORTNAME URL
SLACK www.slack.com
ZOOM www.zoom.com
etc.
I want to display only the first column with the short name of the website.
The user selects the website(s) he/she wants and a procedure runs and selects only those
that have been CHECKED and adds the actual URL and ONLY the URL
to a memo box.
Currently trying this with a TListView which is looking overly complicated in relation to a TListBox. I've tried something along these lines but I get the first CHECKED URL and then it bombs out. Surely it should be as simple as this...
for i := 0 to ListViewURL.Items.Count - 1 do
begin
if ListViewURL.Items[i].Checked = True then
begin
Memo1.Lines.Add(ListViewURL.Items[i].SubItems[i]);
end
else
end;
Can anyone suggest a solution or is there another way to get the result I want.
Thank you in advance
What I have tried:
Currently trying this with a TListView which is looking overly complicated in relation to a TListBox. I've tried something along these lines but I get the first CHECKED URL and then it bombs out. Surely it should be as simple as this...
for i := 0 to ListViewURL.Items.Count - 1 do
begin
if ListViewURL.Items[i].Checked = True then
begin
Memo1.Lines.Add(ListViewURL.Items[i].SubItems[i]);
end
else
end;