LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a custom control of a button where the look will be applied to all others but not the Boolean text?

Solved!
Go to solution

Hi all

 

I would like to create a customized button as a master so that if I change the look of the master all other buttons will change too.

I have done this with a custom control as a "strict type def" otherwise the look will not change BUT If I do this as a strict type def I cannot change the Boolean text anymore which should be different on every button.

 

How can I create a master control of a button where the look will be applied to all others but not the Boolean text?

Stay Hungry, Stay Foolish
0 Kudos
Message 1 of 6
(2,602 Views)

I don't think you can do that. I just looked and as I suspected the Boolean text property is read only for strict typedefs so you cannot use property nodes to change the text.

 

As a workaround just make it a typedef. When you want to change the look open the typedef and make it strict, make your changes, then make it non strict again. You will have to update the Boolean text again for all instances. Kind of a pain. Maybe this is something for the idea exchange.

=====================
LabVIEW 2012


Message 2 of 6
(2,599 Views)

@Steve Chandler wrote:

I don't think you can do that. I just looked and as I suspected the Boolean text property is read only for strict typedefs so you cannot use property nodes to change the text.

 

As a workaround just make it a typedef. When you want to change the look open the typedef and make it strict, make your changes, then make it non strict again. You will have to update the Boolean text again for all instances. Kind of a pain. Maybe this is something for the idea exchange.


Kudos for being sneaky.

 

I like these creative work-arounds!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 6
(2,595 Views)
Solution
Accepted by topic author Benjamin_

@Steve Chandler wrote:

I don't think you can do that. I just looked and as I suspected the Boolean text property is read only for strict typedefs so you cannot use property nodes to change the text.

 

As a workaround just make it a typedef. When you want to change the look open the typedef and make it strict, make your changes, then make it non strict again. You will have to update the Boolean text again for all instances. Kind of a pain. Maybe this is something for the idea exchange.



Alternately, delete boolean text and replace with caption


"Should be" isn't "Is" -Jay
Message 4 of 6
(2,589 Views)

Thank you Jeff

 

That's why I like Labview so much, you always have to be creative to reach your goals. Smiley Mad

Stay Hungry, Stay Foolish
0 Kudos
Message 5 of 6
(2,581 Views)

Be wary- the caption text is not active (if you you click on the caption the click will not drop through the text)  Most power LabVIEW users know this instinctily and avoid clicking on any text over a boolean with out even thinking about it.  Of course then, when you ship your application to the customer....they will ALLWAYS target the text with the mouse.  This can lead to a bit of embarassment (and I was forced to switch from val change events to mouse up? filter event and search for the boolean whose bounds encluded the mouse coordiates.)  not my finest hour but a fast workaround for an "unintended feature" in the design. 

 

Very creatively.... add a note in the typedef's vi documentation to use mouse up filters to avoid unresponsive mouse clicks


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 6
(2,571 Views)