LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Determine cluster element clicked in mouse down event

Is there anything similar to the ArrElem Property Node, that allows a user to detect which element in an array has been clicked on (mouse down event), but for a cluster?

 

It seems the only way I can detect which sub-cluster in my main cluster (see attachment) has been clicked on, is to work out the screen coordinates of each element and compare that to the mouse coordinates of the click - is there any other (better) way?  There's is going to be eight of these main clusters all stacked vertically.

 

NOTE: All sub-clusters in the main cluster are disabled so that nothing "pops-up" when the user clicks on an object.

 

I was thinking of using an array of clusters, but I need the ability to set various properties (eg. blinking) for each individual object.

 

Chris

0 Kudos
Message 1 of 3
(4,442 Views)

For mouse down and not value change (compare old and new).

 

You could edit the event and ad an event for each widget in the cluster and then use the "reference" wired to a property>>>Label to determine which tiem was clciked.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(4,426 Views)

That's not bad Ben - thanks.

I made up a quick VI based on your solution which works great if I have one cluster, but if I have eight+ Main Clusters I have to repeat this Event eight+ times - no?  I was wondering if there was a more scalable solution?

 

I suppose I could just lump ALL the sub-clusters into one massive Main Cluster, but the text string for that Event is going to be very, very long eg. "Main Cluster.Cluster1"....."Main Cluster.Cluster24": Mouse Down

 

Chris

0 Kudos
Message 3 of 3
(4,393 Views)