LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Events on elements of cluster

Hi,
 
I have a cluster with 500 boolean controls (week-calender).
I want to detect some events on these boolean controls :
- mouse enter
- mouse leave
 
I could create an 'enter'-event case and a 'leave'-event case,
and then assign the enter- or leave- events of the 500 controls
to these 2 cases.
But that would take hours because I have to assign each event to this
case individually for every control.
 
Is there a way to do this faster :
Can I assign all 'mouse enter' events on the 500 controls to 1 event case
where the case tells you on which control the mouse has entered using a ref?
0 Kudos
Message 1 of 13
(4,221 Views)

Hi

Could you maybe give information, what you want to do? Maybe there is a good solution.

By the way - I don't know a way that could solve what you describe.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 13
(4,202 Views)
You can compare the New value with the Old value with a "Not equal" comparison, convert the resuting booleanc luster to an array and then search for TRUE.  This will give you the index of the cluster elements which has changed.

Now you can use the Controls[] property of the cluster reference with this index value to get a reference to the actual boolean which has changed.

Example included (LV 6.1).

Hope this helps

Shane.

Edit: In hy hectic, I failed to notice you actually want Mouse enter and Mouse leave events.

This is much harder.  I advise solving the problem in another way.  LV 6.1 doesn't actually have Mouseover events......

Message Edited by shoneill on 03-07-2006 03:39 PM

Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 3 of 13
(4,208 Views)

Shane:

A little bit easier than compare on "not equal" is to just XOr the old and the new value.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 4 of 13
(4,207 Views)
Hello Tomy,

does it have to be a cluster? Can't you use an array of booleans instead? This way it's much easier to maintain...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 13
(4,199 Views)
Becktho,

Er, yup, that's right.

However, I still find "Not equal" easier on the eyes.  I've no hardware background and I always have to do some mental acrobatics when trying to work out what those boolean operators do with non-boolean data.......

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 6 of 13
(4,191 Views)
Don't mind Shane
 
I just picked it up somewhere in the forum, as I wanted to code radio-buttons to work properly.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 7 of 13
(4,189 Views)
Hi,
 
a little more information on the setup :
It's a calendar, where each boolean control represents an hour.
 
I want to change the front an backcolour when hoovering over the actual control.
 
Doesn't have to be in a cluster, just easier to code (500 terminals!)
 
I have not found a way to create one event case state, that gives you feedback
over which control that you hoovered.
 
Please advise!
 
Tommy.
0 Kudos
Message 8 of 13
(4,170 Views)
Instead of 500 booleans for each hour, wouldn't it be easier to use a numeric control for the hour?  Put limits in the control to define min and max values.  If you put focus on the control, the user just has to type in a number and press Enter.
- tbob

Inventor of the WORM Global
0 Kudos
Message 9 of 13
(4,162 Views)
You can use dynamic events to register all your booleans at once. See Pict.

Message Edité par JeanPierre le 03-07-2006 02:27 PM



LabVIEW, C'est LabVIEW

Message 10 of 13
(4,161 Views)