02-14-2014 08:39 AM
To make my VI's look nicer I would like to add some free labels to a tab control on the front panel.
So editing the free texts in the tab control and placing a free text on the block diagram works fine with the attached VI's. (Note: place them both in the same folder)
However if I'm trying to add a free label to the Tab Control with the following code Labview generates error 1060 "LabVIEW: Object cannot contain (own) the specified object."
So now I'm wondering what I need to to in order to add text to the front panel with the help of VI scripting.
Hope you can help.
Solved! Go to Solution.
02-14-2014 09:35 AM
In one case you add a label to a panel, in the other to a tab control. Is there some panel-property for each page?
/Y
02-15-2014 11:07 AM
I haven't tried this specifically, but from your image I would guess that the New primitive simply doesn't recognize the page as a legitimate owner. I would suggest creating it in the pane or FP and then using the Move method on it to move it into the page.
02-15-2014 04:16 PM
2nd thought: On the top one you get the Decos on page-property, while on the lower picture you work on the page-property. What if you Add to the Decos-property-array a label-item?
/Y
02-17-2014 02:02 AM
@Yamaeda
On your 2nd thought: I don't think I need to add the label to the decorations array and/or that it is possible since the parameter is "Read Only".
@tst
You got the answer indirect. I first created the example below to check if I could create a color box on the tab's.
2nd I started browsing trough the style options in order to see if I could find something that would allow me to draw some other form of decoration. And by accident I found the "Label (system)" style (ID = 21961). So the following code generates a nice label on the tab and solves my problem.
11-22-2022 05:13 PM
Although NI refers to Front Panel text as a free label, the style "Free Label" is only for Block Diagram labels. They have an arrow in the lower right that can be stretched to another object for documentation purposes. A front panel "free label" cannot have that functionality so cannot be used there.