|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Click and Double click events are not fired in listview component in VB.NEThi,
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 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? -- Show quoteHide quoteCarsten Thomsen Communities - http://community.integratedsolutions.dk --------- 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) --------- <sethugan***@gmail.com> wrote in message news:1150286530.711493.134950@i40g2000cwc.googlegroups.com... > 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 > 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 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? -- Show quoteHide quoteCarsten Thomsen Communities - http://community.integratedsolutions.dk --------- 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) --------- <sethugan***@gmail.com> wrote in message news:1150287889.480655.251320@i40g2000cwc.googlegroups.com... > 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 > 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 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? -- Show quoteHide quoteCarsten Thomsen Communities - http://community.integratedsolutions.dk --------- 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) --------- <sethugan***@gmail.com> wrote in message news:1150292059.781340.316620@y41g2000cwy.googlegroups.com... > 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 >
Is this Possible ?
The big Debate on DoEvents How to easily create useful data-entry forms in vb.net? Changing datagridview cell borders at runtime DataBase Programming How to easily create data-entry forms in vb.net How can I get Windows user, password and domain? How to override only Get or only Set? How to use Compressed Folder function of XP programmatically? Downloading multiple WebPages and saving to text file help needed! |
|||||||||||||||||||||||