Example Code

String Control Scrolling

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

Coding that exemplifies how to allow the string control to scroll according to the mouse wheel.

 

Description

This example demonstrates using mouse events and string properties to allow the string control to scroll according to the mouse wheel. While not seeming very useful, the addition of scroll response to a program makes the UI more attractive, easier to use, and over all seem better, so the display has a "soft" input method and does not seem so "hard."

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Run the VI.
2. Select the option you would like to use to scroll.
3. Insert a text that is bigger than the control size in order to require scrolling.
4. Place mouse over control and use the wheel to scroll.
5. Stop the execution by using the Stop button.

 

Additional Information or References

Capture.PNG

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