From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Programmatically Adjustable Image Buttons with Picture Controls Using LabVIEW

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 is applicable for  user interface applications in which the developer wishes to use one button control but programmatically change it's appearance depending on the state of functionality of the button.

 

Description

This code implements a button using a picture control.  This is applicable for  user interface applications in which the developer wishes to use one button control but programmatically change it's appearance depending on the state of functionality of the button.


Requirements

  • LabVIEW 2012( (or compatible)


Steps to Implement or Execute Code

  1. Run the vi.
  2.  Choose the JPG file path
  3. Click on A or B to change the picture.

  

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

Regards,
Isaac S.
Applications Engineer
National Instruments

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