07-20-2010 03:49 AM
Hi ...
How do I get coordinates of an element in an boolean array Control when the user click on it?
Is it possible ?
Please see attached image ...
Thanks
07-20-2010 04:29 AM
There are several solutions, the most advanced is on LAVA and should work for any array.
Register for the mouse-down event and feed the coordinates and a ref to the array control into the VI, and it returns the element clicked.
However it looks likeyou want to know which element was changed?
If so XOR the OLD and NEW value in a 'value change' event, this should have one 'T', using an iterative search you should have no issues finding that one value:
Ton
07-21-2010 12:34 AM
Thank you so much
I was tested your idea (based on old XOR new) befor. But there are some problems in my program ...
Can you explain second solution further more ? This way brings back coordinates of situation of the mouse in screen. NOT coordinates of element. ???
And I got LAVA's program too. But I could not understand what does this program do !
Excuse me for my bad english
07-21-2010 01:30 AM
Here's how you would use the LAVA program:
Here's a snippet containing both methods:
Ton