Example Code

Showing and Hiding Controls using Transparent Tabs

Code and Documents

Attachment

Introduction:

This example demonstrates a transparent tab control being used to show or hide sets of controls which pertain to a particular setting, in order to perform a Setup or Configuration.

What other ways are there to show & hide controls?

  • Property Nodes are an obvious choice, but that can get slow, and imagine how many nodes it would take to do what this VI does.
  • Another method I have used is to transfer the focus of the front panel to another origin. Each unique position on the FP can have a group of controls, and a "Back" button can be provided for navigation (I can supply a demo of that if there is interest).
  • Sub panels?
  • Split screens?
  • I think the best method for presenting the user with many configuration controls is to use Sub-VI's as pop-ups, each with its own GUI. However, if you want to keep your VI "flat", I think the transparent tabs idea is a good one.

Some advice:

It is a good idea to supply the user with a Setup Summary on the main panel, which this VI does not demonstrate. The user will want to confirm all of the settings in one place. without having to toggle back to see how they've set it up.

How to use the demo:

Just run it, you'll get the idea

A note:

Yes, many of the controls could and should be clusters, but I kept it flat for demo purposes.

Richard






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

Comments
samjoi
Member
Member
on

very good idea, saves time and propertynode

Contributors