Check out our User Interface Code Repository Files or visit the LabVIEW Wiki User Interface Portal
Tags |
(This content has not been tagged yet)
|
![]() |
Jan 21 2004, 03:22 PM
Post
#1
|
|||
![]() Extremely Active Premium Member ![]() Posts: 595 Joined: 8-December 03 From: Dallas, Texas Member No.: 208 Using LabVIEW Since:2000 LV:8.6 ,8.2.1 ,7.1.1
My Gallery
|
I just realized that it would be very useful to be able to capture the mouse scroll event. Anyone have a good starting point?
-Norm -------------------- Norman J. Kirchner Jr.
Automation Software Engineer ~,~ The Captain Was Here Premium Blend ![]()
|
||
|
|
|||
| Ad |
Jan 21 2004, 03:22 PM
Post
#
|
||
|
|
|
||
|
|
|||
Jan 23 2004, 04:20 AM
Post
#2
|
|||
![]() Confucius say: Crowded elevator always smell different to midget Admin ![]() Posts: 2367 Joined: 13-October 02 From: Planet Earth Member No.: 2 Using LabVIEW Since:1994 LV:8.5 ,8.2.1 ,7.1.1
My Blog
My Gallery
|
If you look at the advanced pallete in LV7 you will see the input device control subpallete. There is a VI that returns the scroll position.
I tried running this but could not get it to work. If we could get this to run I think we would be on our way to solve the problem of trapping the scroll button. --------------------
|
||
|
|
|||
Jan 23 2004, 04:26 PM
Post
#3
|
|||
![]() Very Active Member Posts: 124 Joined: 17-January 03 From: Southern California Member No.: 37 Using LabVIEW Since:1988 LV:8.0.1 ,. ,.
|
Norm,
There is a Mouse Scroll wheel VI on www.labuseful.com. It reports if the mouse is a scroll wheel type and reports the scrolls. Regards
|
||
|
|
|||
Jan 26 2004, 03:48 PM
Post
#4
|
|||
![]() Extremely Active Premium Member ![]() Posts: 595 Joined: 8-December 03 From: Dallas, Texas Member No.: 208 Using LabVIEW Since:2000 LV:8.6 ,8.2.1 ,7.1.1
My Gallery
|
After sending the initial post I had some inspiration. I remembered the "User Input" set of VI's in LV7 and proceeded to do some creative work. I must have had more luck than Mike apparently because I came up with a very elegant solution. Unfortunately I can not post the code here, but I will attach an image of how I am implementing it, which might spark your creativity.
The long and the short of the functionality is I can now drop 1 VI into my program (external to any loop), Wire the reference to the array to be scrolled and another reference to a boolean that will signal the stop of the program (non latching). Once this is done, as shown in the photo, I have a front panel array which I can scroll with my mouse. -Norman J. Kirchner Jr. Engineering Specialsits, Inc. www.engspec.com -------------------- Norman J. Kirchner Jr.
Automation Software Engineer ~,~ The Captain Was Here Premium Blend ![]()
|
||
|
|
|||
Jun 29 2004, 06:31 AM
Post
#5
|
|||
|
Very Active Member Posts: 164 Joined: 18-March 04 From: Canada Member No.: 311 Using LabVIEW Since:1995 LV:8.20 ,7.1.1 ,.
|
I am attaching a 7.0 VI which uses the mouse scroll-wheel to scroll through the listbox control. It scrolls the listbox contents only when the mouse is over the listbox, as expected. As it stands, this is a very specific example. When time permits I (or y'all) can make this more general to scroll through other similar controls.
The working principle in brief: -check if mouse is over the listbox using the 'Mouse Enter' event, -check scrolling, and direction, -depending on the direction, update listbox (within the valid range), -stop scrolling when mouse is moved away ('Mouse Leave' event). Notifiers are used in a master-slave pattern to manage the events. And note that the VI's window-scrolling is disabled. Hope this helps. Regards, Khalid Ansari
Attached File(s)
|
||
|
|
|||
Jun 29 2004, 02:41 PM
Post
#6
|
|||
![]() Active Member Posts: 21 Joined: 27-June 04 From: Shanghai China Member No.: 484 LV:7.1.1
|
-------------------- Qia_sky
Someone will like it!
|
||
|
|
|||
Dec 30 2004, 07:04 PM
Post
#7
|
|||
|
Instant Human, just add coffee Premium Member ![]() Posts: 889 Joined: 31-January 03 From: Waterford, CT USA Member No.: 45 Using LabVIEW Since:1992 LV:8.2.1 ,7.1 ,8.0.1
|
QUOTE (Khalid Ansari @ Jun 29 2004, 01:31 AM) I am attaching a 7.0 VI which uses the mouse scroll-wheel to scroll through the listbox control. ..snip... When time permits I (or y'all) can make this more general to scroll through other similar controls. The generalized version would be very useful, especially if we could "register" a control reference with it and thereafter whenever the mouse was over that control we would get the scrolling effect. I noted one funny behavior. If you move the mouse out of the listbox, scroll (the listbox does not move, good) and then move the mouse back into the listbox, you immediately get a scroll of one. It would be good if you flushed the previous scroll count when the mouse over event is detected for the control. Looking forward to that generic version. -------------------- ************************************************************* "Always listen to the experts, they'll tell you what can't be done, and why. Then go do it." ~The Notebooks of Lazarus Long (by Robert Heinlein) *************************************************************
|
||
|
|
|||
Dec 7 2005, 02:19 PM
Post
#8
|
|||
|
Instant Human, just add coffee Premium Member ![]() Posts: 889 Joined: 31-January 03 From: Waterford, CT USA Member No.: 45 Using LabVIEW Since:1992 LV:8.2.1 ,7.1 ,8.0.1
|
Not a lot of activity on this thread for a while, but I note that the 12/07/05 digest of Info-LabVIEW has a thread going for scrolling trees and other controls. Just in time for me too, as I have a new need for this functionality.
-------------------- ************************************************************* "Always listen to the experts, they'll tell you what can't be done, and why. Then go do it." ~The Notebooks of Lazarus Long (by Robert Heinlein) *************************************************************
|
||
|
|
|||
Dec 7 2005, 04:21 PM
Post
#9
|
|||
|
Very Active Member Posts: 164 Joined: 18-March 04 From: Canada Member No.: 311 Using LabVIEW Since:1995 LV:8.20 ,7.1.1 ,.
|
Hi Michael,
With LabVIEW 8.0 supporting the mouse wheel for such controls, I guess there's not much point in us developing any tools for this anymore. Regards, -Khalid
|
||
|
|
|||
Dec 8 2005, 07:11 PM
Post
#10
|
|||
|
Instant Human, just add coffee Premium Member ![]() Posts: 889 Joined: 31-January 03 From: Waterford, CT USA Member No.: 45 Using LabVIEW Since:1992 LV:8.2.1 ,7.1 ,8.0.1
|
Yes, for LabVIEW 8. I expect to be doing occasional work for clients who are sticking with 7.x or earlier for some time in the future. Nice to have backwards functionality, even if you have to substitute a work around for newer built ins.
-------------------- ************************************************************* "Always listen to the experts, they'll tell you what can't be done, and why. Then go do it." ~The Notebooks of Lazarus Long (by Robert Heinlein) *************************************************************
|
||
|
|
|||
Dec 9 2005, 11:01 PM
Post
#11
|
|||
![]() Extremely Active Premium Member ![]() Posts: 595 Joined: 8-December 03 From: Dallas, Texas Member No.: 208 Using LabVIEW Since:2000 LV:8.6 ,8.2.1 ,7.1.1
My Gallery
|
Sorry for dying off on this thread.
I'll be posting my code for both scrolling on an array AND listbox's Just harass me after the new year when I get my PC back. -------------------- Norman J. Kirchner Jr.
Automation Software Engineer ~,~ The Captain Was Here Premium Blend ![]()
|
||
|
|
|||
![]() ![]() |
| Time is now: 2nd December 2008 - 12:18 AM |