Listview multiselect question

A listview component in vsReport mode with multiselect property set to true.  If the user has selected some listitems (ie. more than 1), how can I know which items have been selected?
PS.  The index(position) of the selected items in the listview should also be known (ie. listview1.selected.index)
Although this question is a bit stupid, pls provide me as many codes as you can since I am only a beginner.
Who is Participating?
simonetConnect With a Mentor Commented:
Just check the Selected property of the TListItem object. Here's an example:

var i: integer;
  with listview1 do
    for i:= 0 to Items.count-1 do
        if items[i].Selected then
          { do something with it!}


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.