Example Code

Smooth Slide Animation Module (For Controls - Up & Down)

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
To takes a reference for a control, check's it's Top property, and smoothly scrolls it to the Target Top.

Description:
This is a module that takes a reference for a control, check's it's Top property, and smoothly scrolls it to the Target Top. The control refnum and the Target Top are both required inputs for the module. The delay is set to 25ms by default. The delay must not be too long, because the VI only exits when the animation has finished. The smooth scroll is achieved by halving the remaining distance on each iteration of the loop - and the exit condition is permitted when the remaining distance is less than 2 pixels.

Instructions:
To implement this example:

  1. Use the VI as the subVI and pass the Control Reference

To execute this example:

  1. Install the required software.
  2. Open the VI and refer the Implement Steps


Requirements
Software
LabVIEW 2012 or compatible

Hardware
-

bd.pngfp.PNG

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

Regards,


Imtiaz Chowdhury
Project Manager
Green Running / Austin Consultants

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