Does anybody know how one can remove one listitem (that was selected by the clickitem event) from the listview control. I am using the listview control in reportview.
How about something like this:<br>
<br>
Private Sub list1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)<br>
If Button = vbRightButton Then<br>
List1.RemoveItem List1.ListIndex<br>
End If<br>
End Sub<br>
<p>Steve Meier<br><a href=mailto:sdmeier@jcn1.com>sdmeier@jcn1.com</a><br><a href= > </a><br>
Click vs. MouseDown... My intent by doing it this way was just clicking on the item in the list wouldn't delete it. You could select it first, and then if you right clicked on it, it would delete it. I thought it might me quite unfriendly if you clicked on the item and then it disappeard on you. This would give the user the ability to select the item to delete and then right click to delete it.<br>
<br>
If I were to write this in an actual application, I would pop up a menu based on a right click, where one of the options would be delete.<br>
<br>
Good question! <p>Steve Meier<br><a href=mailto:sdmeier@jcn1.com>sdmeier@jcn1.com</a><br><a href= > </a><br>
And good response - it might very well be a bit unfriendly to delete stuff as people click on it.<br>
<br>
I don't write my applications like that - honest!<br>
<br>
-ml<br>
<p>Mike Lacey<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href=
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.