Click and Double click events are not fired in listview component in VB.NET

Click and Double click events are not fired in listview component in VB.NET

Post by sethuganes » Thu, 15 Jun 2006 21:02:10

hi,

i have created a sample window aplication in VB.NET.placed a
listview component in the form ,written click and double click event
for list view.But the events are not fired.is there any property to be
set for click event.


Thanks,
Ganesh

 
 
 

Click and Double click events are not fired in listview component in VB.NET

Post by CT » Thu, 15 Jun 2006 21:18:40

How did you create the event handling code? Did you create it manually and
if so, did you use the WithEvents statement when declaring the listview and
add the Handles clause to the event handler procedure declarations, or are
you hooking up the event handlers with the AddHandler statement? I guess
what I am asking, is it possible that the event haven't been hooked up to
your event handlers?

--
Carsten Thomsen
Communities - http://www.yqcomputer.com/
---------
Voodoo Programming: Things programmers do that they know shouldn't work but
they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------

 
 
 

Click and Double click events are not fired in listview component in VB.NET

Post by sethuganes » Thu, 15 Jun 2006 21:24:49

hi,

listview is not created manually. Dragged it from the toolbox and
dropped it in the form.
This is the click event code

Private Sub ListView1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles ListView1.Click
MsgBox("inside click")
End Sub

Thanks,
Ganesh
 
 
 

Click and Double click events are not fired in listview component in VB.NET

Post by CT » Thu, 15 Jun 2006 21:48:29

Hmm, is the listview empty, and if not, are you clicking on an item or on
the "empty" part of the listview? If the listview is empty, try adding one
or more items using the Items property in the Properties window.

Are you trying to catch a click on an item?

--
Carsten Thomsen
Communities - http://www.yqcomputer.com/
---------
Voodoo Programming: Things programmers do that they know shouldn't work but
they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
 
 
 

Click and Double click events are not fired in listview component in VB.NET

Post by sethuganes » Thu, 15 Jun 2006 22:34:19

hi,

i have added some items and when i clicked on top of the item the event
ListView1_SelectedIndexChanged gets fired.whereas the click event is
not fired.

Thanks,
Ganesh
 
 
 

Click and Double click events are not fired in listview component in VB.NET

Post by CT » Thu, 15 Jun 2006 23:22:14

Hmm, I'm no ListView expert, but I believe the ItemSelectionChanged fires
when you click an item. It seems to be generally more useful than
SelectedIndexChanged, because the event handler is passed an instnace of the
ListViewItemSelectionChangedEventArgs class, which you can use to directly
reference the Item that was clicked. I don't know is that is what you're
after?

--
Carsten Thomsen
Communities - http://www.yqcomputer.com/
---------
Voodoo Programming: Things programmers do that they know shouldn't work but
they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
 
 
 

Click and Double click events are not fired in listview component in VB.NET

Post by seeth » Tue, 25 Aug 2009 22:29:32

Double or mouse Double click is not triggering in an empty listview can anybody tell me how i can make the action to be done while double clicking

From http://www.yqcomputer.com/ ://www.developmentnow.com/groups/post.aspx?newsgroupid=38&threadid=772709&ei=_ZSSSuXOOZjw7APd3f3WCg&rct=j&q=class+to+perform+doubleclick+event+in+vb.net+empty+list+view&usg=AFQjCNFWaa0a7UF1SXfVKYJ4KLIVlhbusA

Posted via DevelopmentNow.com Groups
http://www.yqcomputer.com/
 
 
 

Click and Double click events are not fired in listview component in VB.NET

Post by Scott M » Thu, 27 Aug 2009 10:25:12

Controls in a container like a listview can't be interacted with directly.

http://www.yqcomputer.com/

-Scott