LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I determine the boolean selected in a pane mouse down event?

Solved!
Go to solution

I have many boolean controls and indicators in my VI and I would like to determine which boolean is selected (left clicked) in a pane mouse down event.  Can I do this without having to specify each of the booleans in the event case setup?

Thanks.

Jim

0 Kudos
Message 1 of 3
(2,714 Views)
Solution
Accepted by topic author nader1234

If you get a ref to all of your booleans they have properties that define there location and their size. Compare the click location with the bounds of each boolean and the one where

 

Left < click < right

 

AND

 

Top < click < bottom

 

you found the boolean the click was over.

 

It may be easier to use the array of bolean refs to create a Dynamic Event and then use the ref returned by the mouse down to get the label of teh boolean that was clicked.

 

Have fun,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 3
(2,710 Views)
Ben, thanks for the suggestion.  I used the Panel-Controls property to get an array of all of the controls and then typecasted it to the Boolean class ... and then created a Dynamic Event.  Works great!  Thanks again.
0 Kudos
Message 3 of 3
(2,683 Views)