Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listview DoubleClick won't fire 95% of time.

Status
Not open for further replies.

sodakotahusker

Programmer
Mar 15, 2001
601
I am using the MouseDown event to do Drag and Drop. I use Double Click to invoke update mode. However the MouseDown seems to be preventing the Double CLick from firing most of the time.

I found another user with this issue. The only response said:

When you doubleclick the mouse button then the MouseDown and MouseUp events are also raised and this is the reason you see the code for MouseDown is executed first.
The something happens with Click and DoubleClick on a control that support both.
You should consume one of them.

I am not sure what this means (or if this is the solution). Can someone enlighten me??? Thanks!!
 
Taken from the output window, here's an order of events that gets fired everytime you do a click/dblclick on .net:

On a mouse-click, we get:
MouseDown
Click
MouseUp

On a double click, we get:
MouseDown
Click
MouseUp
MouseDown
DoubleClick
MouseUp

DoubleClick never prevents nor even precedes the mousedown event, or could be something else.

ciao
 
Actually it is not the mousedown event that prevents the double click from firing - it is the doDragDrop that does it.

Here is a link that provided the answer for me:


Bottom line: Do not use the mousedown event with dragging and dropping operations. ItemDrag works just fine!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top