LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I hide a text label as I would a control or indicator?

As I have multiple indicators that must have the same identifier to the operator I can not use the indicator label as the items identifier. At times I want to hide the indicator and label. How can I hide the label? Please recall a text label just sits on the front panel as desired. It isn't within a raised or lowered box. In the attached sample I would like to hide "MyLabel" when the date indicator is hidden.
0 Kudos
Message 1 of 4
(7,221 Views)
Instead of using text on the front panel, use the indicator's caption. You can then have indicators with unique names but all have the same caption. When you hide the indicator, the caption is hidden with it.
Message 2 of 4
(7,221 Views)
Here�s a way. Its a little involved, but it will work:
1. Customize a control or indicator to remove the border (I used a string control)
a. Right click on the control or indicator, go to �Advanced � Customize�
b. Click on the wrench on the tool bar to enter edit mode
c. Select the border and drag it off to the side
d. Reduce the size of the border to a single pixel (it won�t let you delete it)
e. Rubber band a box around the 1 pixel border to select it and use the cursor keys to move it within the �white space� of the string control. It will effectively disappear. You will NOT be able to move it with the mouse as LV will try to resize the border instead of moving it.
f. Using the color tools �suck up� the background color of your vi and �paint� i
t into the white space of the control.
g. Make the control the correct size to hide your label(s). Make sure it is right as you will NOT be able to resize the control outside of the �customize� function (i.e.: while on your front panel)
h. Click on the tweezers to go back to customize mode.
i. Give your control a descriptive name
j. Right click on the control, go to �Visible Items� and uncheck �label� to hide the label.
k. Save your new control
2. Back on your front panel, place your new control over what you want to hide and programmatically make it visible or invisible as desired.

I have included a copy of your original vi, modified to hide and unhide your label. I have also included the customized string control that accomplishes this. You may resize the control as needed by �customizing it as described above.

The only disadvantage to this method is that if you want to hide multiple labels they must be in the same area of the front panel. Otherwise you must have seve
ral �hiding� controls.

An advantage is that you will not have to make the original control or indicator (i.e.: the date indicator) visible or invisible as it can be hidden as well.

Hope this does what you want.

Good Luck.
Download All
Message 3 of 4
(7,221 Views)
Use a string indicator instead of a text label. Then you have full control of its attributes.

Cheers,
Bill Kemmerer
0 Kudos
Message 4 of 4
(7,221 Views)