Listview questions

hog

Senior Contributor
Joined
Mar 17, 2003
Messages
984
Location
UK
I'm using a listview for the first time.

I have two problems:

1. The first is that the control only seems to allow a single click to select an item in the list. Is there no way to change this to a double click?

2. After the first click which accepts the choice being made if I then click on any white area of the control I get an error message "specified argument was out of range of valid values: parameter name index"

Any ideas??
 
on the click event you should first check if anything is selected within the listview

Visual Basic:
        If ListView1.SelectedItems.Count > 0 Then
        ' Do somthing ...
        End If

That should stop your error

Andy
 
DOH!

as easy as that!!

I had my code in the SelectedIndexChanged event....

Thnx:)
 
Back
Top