LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I change "Boolean Text" property for a button in a Boolean Button Cluster?

My first Post.
I am using a Button Cluster as a Menu.
I want to change the "Boolean Text" property of the buttons each time they are pressed.
For example, If I press the button "Modify", I want it's text to be "Cancel".

------------ My Try-out -------------
I have tried to create a Reference from the Cluster, and then created the Property Controls
From the Array of Controls, I Index the First One and I wire to a Property Node, but I can't select "Boolean Text" property.
Any Ideas??

Thank you all for reading this post.
Aitortxo.
Aitortxo.
Message 1 of 4
(3,847 Views)
Instead of creating a reference to the cluster and finidng the reference to the button from that, right-click on the button itself and create a direct reference to it...then use that to set the boolean text property.
0 Kudos
Message 2 of 4
(3,847 Views)
Thank you for your fast answer!!
And, yes, it works fine with that!.

The problem is that that method is suitable for a few buttons only. I would like the Reference to the Cluster to be enough.

Here, testing a litle bit more I have found the
"To More Expecific Class"
Function (In Function -> Application Control)

I have done this:

Reference To Cluster
|-Controls[] Property
|-Index Array (I select amy button)
|-TO MORE EXPECIFIC CLASS

It asks for a Reference (I wire a Reference to a Boolean Control)

Now I can select Boolean Text...

but... It doesn't work , It says "Error 1055. Object Reference is Invalid"

Aja!, I wired a Reference to a Boolean control... BUT, if I wire the reference you said... IT W
ORKS!!!

Ohhh.... Really interesting.

Aitortxo.
Aitortxo.
0 Kudos
Message 3 of 4
(3,847 Views)
> I have tried to create a Reference from the Cluster, and then created
> the Property Controls
> From the Array of Controls, I Index the First One and I wire to a
> Property Node, but I can't select "Boolean Text" property.
> Any Ideas??
>

The other post explained the easier way to get this working, but just to
explain what was happening, for those cases when you do need this to
work. The issue was that the cluster can contain any type of control.
Therefore the Control reference is a very generic class, which lets you
access the generic properties of all controls. To access more specific
control properties, you need to cast the datatype to be a Boolean. This
will succeed if the control really is a Boolean, and it will return an
error at runtime
for those cluster items that are strings, numerics, or
other controls. The casting is on the same palette as the property node
and is called To More Specific Class. You can use the class specifier
constant to select the Boolean Class, or use any other wire of the
appropriate type.

Greg McKaskle
0 Kudos
Message 4 of 4
(3,847 Views)