Example Code

Programmatically Hiding Controls and Indicators

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 demonstrates programmatically controlling the visibility of a given control or indicator on the front panel.

 

Description

A control or indicator can be made visible or invisible by setting its Visible property. Using an event structure to detect when a button is pressed, we can change the visibility of a control or indicator with a property node. This concept can be used in more complex applications.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run the VI
  2. Toggle the Boolean control to change the visibility of the indicator or control (in this example, a Waveform Chart and a boolean are used)

 

Additional Information or References

 

Front Panel

2.PNG

 

 

Block Diagram

1.PNG

 

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

Charley Dahan

Global Account Manager

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

Comments
Todd S.
NI Employee (retired)
on

Great stuff, thanks for posting!

Todd S.
LabVIEW Community Manager
National Instruments