|
-
Mar 6th, 2006, 09:31 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] listview question
VB Code:
Private Sub ListView1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim oItem As ListItem
If Button = vbRightButton Then
Set oItem = ListView1.HitTest(x, y)
If Not oItem Is Nothing Then
oItem.Selected = True
PopupMenu mnuPopup
End If
Else
Text2.Text = ListView1.SelectedItem.ListSubItems.Item(1)
End If
End Sub
Im trying to make the selected item appear in text2.txt, but it only appears when i double click it with left mouse click , how can i make it appear on a single click?
-
Mar 6th, 2006, 09:33 AM
#2
Re: listview question
 Originally Posted by Pouncer
Im trying to make the selected item appear in text2.txt, but it only appears when i double click it with left mouse click , how can i make it appear on a single click?
A single left mouse click or a single right mouse click?
-
Mar 6th, 2006, 10:34 AM
#3
Thread Starter
Frenzied Member
-
Mar 6th, 2006, 10:51 AM
#4
Frenzied Member
Re: listview question
VB Code:
Private Sub ListView1_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
If ListView1.HitTest(x, Y) Is Nothing Then Exit Sub
If Button = vbRightButton Then
PopupMenu mnuPopup
End If
End Sub
oh1mie/Vic

-
Mar 6th, 2006, 11:04 AM
#5
Re: listview question
If you are going to use a Single Left mouse click, you can use your MouseDown event for your popup and the ListView's click event to pop the text in the textbox.
VB Code:
Private Sub ListView1_Click()
Text1.Text = ListView1.SelectedItem.Text
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|