Overview:
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.
Description:
There are many further options available in the property node for the user to select.
Requirements:
Steps to Implement or Execute Code:
Additional Information or References:
"**This document has been updated to meet the current required format for the NI Code Exchange.**"
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
This is brill i used it with a imported transparent image which i flash using the visible property
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.
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.