listview selected item

blabore

Well-known member
Joined
Jan 31, 2002
Messages
48
Location
Austin, TX
Ok, pretty silly question here. How can I ensure that an item remains selected in the listview control? I have it setup as "list", with HideSelection set to false. However when I click on the empty white space in the control the selected item gets set to nothing. Any ideas would be appreciated.
 
Code:
    Private Sub ListView1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseUp
        ListView1.FocusedItem.Selected = True
    End Sub
hope that helps :)
 
Back
Top