Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Listview multiselect question

Posted on 1999-07-16
1
Medium Priority
?
1,113 Views
Last Modified: 2011-10-03
Hello,
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.
Thanks!
0
Comment
Question by:yingkit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 15

Accepted Solution

by:
simonet earned 40 total points
ID: 1388989
Just check the Selected property of the TListItem object. Here's an example:

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

Yours,

Alex
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question