Example Code

Programmatically change a Free Label in the Front Panel in LabIVEW

Code and Documents


Download All

The VI below shows how to programmatically select a Free Label in the Front Panel of LabVIEW and how to change the Text and if this wants to be visible.

There are many further options available in the property node for the user to select.


  • LabVIEW 2012 (or compatible)

Steps to Implement or Execute Code:

  1. Run the VI.

 Additional Information or References:Screenshot_1.png


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


Many thanks for using the NI forums and I look forward to your reply.

Kind regards


Applications Engineer
National Instruments UK

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

NI Employee (retired)

This is brill i used it with a imported transparent image which i flash using the visible property

Applications Engineer
National Instruments
UK Branch

===If this fixes your problem, mark as solution!===
Active Participant
Active Participant

Any clever ways of identifying free labels if you have multiple decorations, controls and multiple free labels on the front panel?

I can check the type of each reference in the "Decos[]" array and filter out the free labels, but other than reading the text value of each free text label (and using that) I don't know of a way to uniquely identify one label over another.

Finding it by trial and error and then using a constant to index out the correct one only works until you add one or more objects to the front panel, since the deco list seems to "grow" by putting newly adde items to the 0-index of the array.

(and marginally related, wouldn't it be great if grouped controls/decorations could be programatically moved/positioned as a group? -but alas, I have not found any way to reference a "group" item.)

My solution so far has been to use classic simple string labels with transparant fore- and back- grounds to mimic free labels.

CLD LabVIEW 7.1 to 2016
Active Participant
Active Participant

I used area height but your way sounds better, although if you're changing the text value....  and there's an unclean abort without a reset....


Would be great if there was something like the numbering system in a type def to show the index associated with the decoration or assigning a value to the free text variable would be handier again.