12-16-2011 09:04 AM
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?
Solved! Go to Solution.
12-16-2011 09:22 AM
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.
12-16-2011 09:40 AM
@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
12-16-2011 10:09 AM
@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
12-16-2011 10:27 AM
Thank you Jeff
That's why I like Labview so much, you always have to be creative to reach your goals.
12-16-2011 12:17 PM - edited 12-16-2011 12:19 PM
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