Click/Double Click Event

The place for threads about TimoSoft ExplorerListView.
Post Reply
ufo973
Lieutenant
Posts: 12
Joined: 09 Aug 2012, 22:45

Click/Double Click Event

Post by ufo973 »

Hi Everybody!

i can't make it to display a msgbox when clicking/double clicking on a listeview item?

My code...

Code: Select all

Private Sub listview_DblClick(ByVal listItem As ExLVwLibUCtl.IListViewItem, ByVal listSubItem As ExLVwLibUCtl.IListViewSubItem, ByVal button As Integer, ByVal shift As Integer, ByVal x As Single, ByVal y As Single, ByVal hitTestDetails As ExLVwLibUCtl.HitTestConstants)
Msgbox "You Double Clicked Me"
End Sub

Code: Select all

Private Sub listview_Click(ByVal listItem As ExLVwLibUCtl.IListViewItem, ByVal listSubItem As ExLVwLibUCtl.IListViewSubItem, ByVal button As Integer, ByVal shift As Integer, ByVal x As Single, ByVal y As Single, ByVal hitTestDetails As ExLVwLibUCtl.HitTestConstants)
MsgBox "You just click me"
End Sub
And if you can show me how to show the value of the clicked item in the msgbox please.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Click/Double Click Event

Post by TiKu »

For the events, see the FAQ

What do you mean with "value"? Do you want to know whether the item is Selected? Or whether it is the caret item? Or whether it is checked (if you display checkboxes next to each item)?
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
ufo973
Lieutenant
Posts: 12
Joined: 09 Aug 2012, 22:45

Re: Click/Double Click Event

Post by ufo973 »

I think the value is already in the (ByVal listItem As ExLVwLibUCtl.IListViewItem)

So now my question is...
How to popup a msgbox when an item is double clicked in the listview?
Please help me. Thanx
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Click/Double Click Event

Post by TiKu »

Read point 2 of the FAQ. It explains why you don't get the events and also tells you what you have to do to get them.

And I still don't know what you mean by "value". Yes, the listItem object probably contains what you are looking for, but since I don't know what you are looking for, I cannot tell you which property of this object you could use.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
ufo973
Lieutenant
Posts: 12
Joined: 09 Aug 2012, 22:45

Re: Click/Double Click Event

Post by ufo973 »

I understand that most events are disabled by default. But how to enable the double click event please? I am a noob so sorry for lots of questions.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Click/Double Click Event

Post by TiKu »

Solved via ICQ. If somebody else wants to know how to do this: Open the control's property pages and there you can edit the DisabledEvents property. Of course, you could also change this property at runtime.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Post Reply