LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you create a custom control which has several buttons?

Can you do this in LabView?

I want to make it so that one button will disable or switch the value/state of another. (Think minesweeper). I can create the logic in a subVI, but only if I have access to the property nodes of each of the buttons.

I want the front panel of the main VI to have the buttons on it, and I don't want the buttons to appear in a separate window.

If I place all of the buttons individually on the front panel of the main VI and pass their references to the subVI, I end up with tons and tons of variables in the main VI block diagram. It works but is very very messy.

I tried to create a custom control with a cluster of buttons in it, but I can't seem to get at the individual property nodes. Is it possible?

(*sighs* I wanna Class!)

Thanks in advance
🙂 jen
0 Kudos
Message 1 of 3
(2,687 Views)
Hi Jen

Yes it is possible to get the individual property nodes of controls that are in a cluster.

You have a property Controls[] in the property node of the cluster, so you get an array of control references. You just have to extract the single references to access the controls.

I attached a screen-shot, which shows this possibility.

Hope it helps.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 2 of 3
(2,680 Views)
Ah ha!

Thanks a lot!

Now I can shrink my block diagram!

Yay!

🙂 jen
0 Kudos
Message 3 of 3
(2,671 Views)