Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Understanding Theory to achieve practice


Reply
 
Thread Tools Display Modes
  #1  
Old 02-15-2004, 08:08 AM
Par Midling Par Midling is offline
Centurion
 
Join Date: Jan 2004
Location: Arkansas
Posts: 139
Question Understanding Theory to achieve practice


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?
Reply With Quote
  #2  
Old 02-15-2004, 09:11 AM
herilane's Avatar
herilane herilane is offline
Unashamed geek

Retired Moderator
* Expert *
 
Join Date: Jul 2003
Location: London, England
Posts: 8,988
Default

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.
Code:
Private Sub List1_Click() Debug.Print "Click" End Sub
3) Correct
Reply With Quote
  #3  
Old 02-15-2004, 03:47 PM
Gruff's Avatar
Gruff Gruff is offline
Bald Mountain Survivor

Super Moderator
* Expert *
 
Join Date: Aug 2003
Location: Oregon, USA
Posts: 5,877
Default

Quote:
Originally Posted by herilane
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.
Code:
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.
__________________
Burn the land and boil the sea
You can't take the sky from me


~T
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Practice birdawg Tech Discussions 4 01-05-2003 10:26 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->