09-04-2014 03:32 PM
Hi everyone, is there a way to read out all of the decoration refnums? I would like to hide certain "free labels" on the front panel based on certain test conditions. My problem is I don't know how to identify what each decoration refnum is. Is there an easy way to do this?
Thanks!
09-04-2014 04:14 PM - edited 09-04-2014 04:15 PM
You have to do it programatically. Look at the OpenG function for Fit Panel to Largest Decoration under the application control palette. Using the panel reference from a VI (using the property node) you can get the array of decorations (again using a property node). Then the OpenG function finds the largest one (most area) and sets the front panel to that size.
EDIT: Once you have the reference to the decoration you can use the property node Visble to hide or show it at run time.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-04-2014 04:18 PM
09-04-2014 05:19 PM
The previous responses should help you find references to all of the Decorations on your Pane (= Front Panel), and you can (probably) filter this list to get just the Text decorations. To find the specific decoration you are seeking, use the interesting "trick" that for Text decorations, the Text is actually the Label associated with the Decoration. As far as I can tell (testing only a few Decorations), while all Decorations seem to have a Label Property, you cannot write to this property for, say, a Raised Frame, so you cannot easily identify them by names that you assign to them. The Text decoration seems to be a happy Exception/Oversight/Fluke.
There may be something on the Ideas page to allow associating Labels with Decorations so we can find/manipulate them programmatically -- if there isn't, there should be ...
Bob Schor
09-04-2014 06:33 PM
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-05-2014 06:55 AM
@Bob_Schor wrote:
The previous responses should help you find references to all of the Decorations on your Pane (= Front Panel), and you can (probably) filter this list to get just the Text decorations. [...]
My snippet will find only the Text decorations (free labels); no filtering is required.
09-05-2014 07:47 AM
Try this.
09-05-2014 10:22 AM
Thanks for everyones response. This is some really good information.