Example Code

LabVIEW VIs for Scrolling Controls with the Mouse

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This example VI allows the user to navigate charts, increment/decrement numeric controls and scroll through arrays using the mouse in LabVIEW 2012. 


Description
The VI works by using an event structure to measure whether the user has entered the control with the mouse or left the control. At which point the input data VIs are used to perform the scroll action on the control. 

Notes:

Also note that it is possible to download my other example which shows the creation of Palettes. This will include the software required and all the VIs and the only thing you need to do is run an install.bat file.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Unzip the attached folder to your computer
  2. Open " Numeric Scroll.vi" for numeric scrolling
  3. Open " Chart Scroll.vi" for chart scrolling
  4. Open " Array Scroll.vi" for array scrolling

 

Additional Information or References

VI Block Diagram

Array.PNG

Chart.PNG

Numeric.PNG

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**


Larry Colvin
Associate Principal Engineer
Dyson Technology Ltd.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
TimS.
Member
Member
on

Hi Larry, Inspired by your VI's for Mouse Wheel Scrolling and Norm Kirchner's SMoRES presentation I decided to take a crack at creating a more universal DropIn VI for scrolling FP objects. Here's the result: https://decibel.ni.com/content/docs/DOC-26497



Tim Sileo
RF Applications Engineer
National Instruments



You don’t stop running because you get old. You get old because you stop running. -Jack Kirk, From "Born to Run" by Christopher McDougall.
bienieck
Active Participant
Active Participant
on

Hi Larry,

The tools you provided are very useful. But I found that when you try to use scroll by clicking and dragging it, doesn't work properly.

 

Other comment: it is really surprising that mouse wheel scrolling require that additional code. It is typical functionality. Why it is not embedded into control?

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.