T
TexKiernan
I have a listview control in a subform. I also have a treeview in the parent
form. When I click a child node on the tree, the subform displays the
corresponding record and fills the listview with a list of files in a
specified folder. I need a double click to open the selected file. However,
I can only get the double click event to fire after I have been editing the
code for the form all other times, it fails? Code below:
Private Sub Listview0_DblClick()
Dim lListItem As ListItem
Set lListItem = ListView0.HitTest(sngListViewX, sngListViewY)
If (lListItem Is Nothing) Then
MsgBox "You did not double-click on a ListItem."
Else
MsgBox "You double-clicked on ListItem=" & lListItem.Text
End If
Set lListItem = Nothing
End Sub
Private Sub ListView0_MouseUp(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Long, ByVal Y As Long)
sngListViewX = X
sngListViewY = Y
End Sub
form. When I click a child node on the tree, the subform displays the
corresponding record and fills the listview with a list of files in a
specified folder. I need a double click to open the selected file. However,
I can only get the double click event to fire after I have been editing the
code for the form all other times, it fails? Code below:
Private Sub Listview0_DblClick()
Dim lListItem As ListItem
Set lListItem = ListView0.HitTest(sngListViewX, sngListViewY)
If (lListItem Is Nothing) Then
MsgBox "You did not double-click on a ListItem."
Else
MsgBox "You double-clicked on ListItem=" & lListItem.Text
End If
Set lListItem = Nothing
End Sub
Private Sub ListView0_MouseUp(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Long, ByVal Y As Long)
sngListViewX = X
sngListViewY = Y
End Sub