12-21-2011 04:20 PM
Hi,
Ideally I like to have the situation of displaying a number of pen pictures in 2d picture indicators on my front panel. Then when one of the picture indicators is clicked/double clicked an event is triggered and handled accordingly.
As a picture indicator has no state i.e. true/false I can't use a change value event as I'd like to. So I'm wondering if anyone has any other neat suggestions to get the functionality I want i.e. where an event is triggered when one of the pictures is clicked/double clicked.
I've experiemented with mouse enter event but it's not really suitable for my application.
Strokes
Solved! Go to Solution.
12-21-2011 05:08 PM
I don't know if you can take advantage of this, but check out the Mouse property node of a 2D picture. (Right click on the picture, then click Create-Property Node-Mouse. Then create an indicator for this property node. The mouse position will be -1,-1 if the mouse is anywhere except the picture and will give you XY coordinates when the mouse is on the picture. Also, the mouse button indicators are only active when the mouse cursor is on the picture. So you might be able to use an event based on a value change on the mouse button on the picture.
12-21-2011 05:17 PM
simple example attached
12-22-2011 05:03 AM
@craigp wrote:
simple example attached
Any chance you could down convert to 2010?
12-22-2011 06:03 AM
Just use the double clicked tag from the mouse down event:
12-22-2011 08:00 AM
.. and when you are rady to move on to an advanced use of the Pitcure Control and events, take at look at Ton's Event Registration Nugget where he taught us how to monitor events from a sub-VI.
What he showed us in that thread represents the core of most of my "On-the-Fly" GUIs where I use those techniques to make it look like there are controls on a GUI.
Have fun!
Ben
12-22-2011 09:59 AM
Here's a 2010 version. I think the other answer you got using the event case should also work (and is simpler), but I'm posting this just in case it is helpful.