Archived

This topic is now archived and is closed to further replies.

ListView - VB

This topic is 5579 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do i lock a listview so the listitems are not editable/writeable? And how do i get the current/selected listitem? Like ListIndex in regular listboxes...? Help me! JFK

Share this post


Link to post
Share on other sites
with regard to making them non-editable, i'm not entirely sure... on the matter of choosing the currently selected one, however, see the following code:

Private Sub ListView_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)

Dim ThisItem = Object

Set ThisItem = ListView.HitTest(x, Y)
:
:
V

End Sub

that should just about do it... you can then simply perform all the necessary procedures available to an item type object... hope that helps...



[edited by - paulus_maximus on September 9, 2002 11:52:47 AM]

Share this post


Link to post
Share on other sites
Oh, that''s great!

Here''s another method i thought of...

For i = 1 to ListView.ListItem.Count
If ListView.ListItem.Selected = true then.....

But thanx alot!

Share this post


Link to post
Share on other sites