Understanding Theory to achieve practice

Par Midling
02-15-2004, 08:08 AM
As I understand it the following is true:
1) The order of sequence of events is a) mouse down, b) click, c) mouse up, d) doubled click. I'm not sure where exactly an item in a ListView item would be selected in this sequence.
2) If any of those events have code then those events which follow it do not occur.
3) A right click does not generate a click event.

What I am trying to do:
I have a listView in which I am trying to get a left click to increase a priority fiend, a right click to decrease a priority. And if it is the first click on a particular item then add a bunch of stuff in a textbox. If it is a click on an item that is already selected then increase/decrease priority.

I could flag the Left/right mouse in mouse down. But I don't know how to then get the click event to work. I could flag the selected item (Something like: If clicked itemindex = flagindex then increase/decrease
priority depending upon flagLRight.)

But there again, I'm not sure if the mousedown takes place before of after the item clicked on is actually selected, or how to get the mousedown to call the click event.

Anybody got any pointers, or clarity?

herilane
02-15-2004, 09:11 AM
1) The order of events in the case of a double-click is:
Mouse down
Click
Mouse up
Double-click
Mouse up

2) All event procedures will run. That's also how you can find out in which order the events occur: put a Debug.Pring line in each event procedure, and you can track all the events.
Private Sub List1_Click()
Debug.Print "Click"
End Sub
3) Correct

Gruff
02-15-2004, 03:47 PM
1) The order of events in the case of a double-click is:
Mouse down
Click
Mouse up
Double-click
Mouse up

2) All event procedures will run. That's also how you can find out in which order the events occur: put a Debug.Pring line in each event procedure, and you can track all the events.
Private Sub List1_Click()
Debug.Print "Click"
End Sub
3) Correct

Good Idea, I usually use a msgbox in each event. I like the debug idea better.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum