Example Code

Password Protected Tab Control with a Login 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 VI Password Protected Tab Control with a Login

 

Description

Some applications require protected controls/tab controls with a Login. This can be done by setting the property of the specific tab that must be protected. The tab control has a property named Pages that provides an array of references to each tab. From the array, the appropriate tab reference is indexed and the property for PageEnb is set. There are three options for the property:

  • Page Enabled
  • Page Disabled
  • Page Disabled & Grayed

In this VI, when the Enter button is pressed, the value from the password string control is compared to the password and if it matches, the tab is enabled.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run the VI
  2. Insert Password
  3. Press Enter and see if the Passport Protected Tab is Enabled
  4. Note: You can change the Password in the block diagram

 

Additional Information or References

VI Block Diagram

 

Tab Control Password LV2012 NI Verified BD.jpg

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

 

National Instruments
Applications Engineer

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