LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Image Map

Using LV7.X can you put a drawing or picture on the front panel vi,hover over parts of the picture and create a hyper link to sub vi's when a portion of the picture is clicked on ? I've been told this is something like Image Map or Mouse Over. I'm trying to dress up my vi. I'm going to have a menu selection similar to the one in "Properties Tutorial.vi" shipped w LV. I'd also like to add a drawing of my UUT. When the operator "hovers" over a particular spot w the mouse arrow, a vi name I've written is display and allows the user to click and start execution of that particular test. I've looked at Developers Zone, Examples etc but couldn't find anything. How do I get the dwg in LV7x ??

Thanks
0 Kudos
Message 1 of 6
(4,103 Views)
Display your image in a picture control. Use Event structure to catch click event of the ctrl.
When clicked, get the color of cursor point, and react accordingly.

George Zou
http://gtoolbox.yeah.net
George Zou
0 Kudos
Message 2 of 6
(4,087 Views)
Apart George solution, you can also use a transparent boolean control, placed just above the part of the picture that you want to "activate". Then use an event structure to catch mouse in and mouse up events. See the attached vi.

CC
Chilly Charly    (aka CC)
Message 3 of 6
(4,077 Views)
George's suggestion is a good pure-LabVIEW one, but it could be a lot to bite off for a relatively inexperienced programmer. Many of the steps involved are somewhat complicated: getting your desired image into the picture control in the first place, determining which portion of the image was clicked, etc. Plus, if you want to display test names as the user hovers over various hotspots in the image, then you are going to have to poll your picture control in a loop, which can also be complicated and will slow everything down to boot.

If you're on Windows and are willing to live with a Internet Explorer Web browser embedded in your VI's front panel, then there's an alternate method that involves less programming overhead. You can literally use hyperlinks and an HTML image map, as you alluded to in your question, and have LabVIEW react to various clicks that the user makes in the image map by launching your test VIs. Another advantage is that the IE browser will display "tool tip" text as the user mouses over the different image hotspots without generating any extra overhead in LabVIEW.

I've attached an example (Image Map UUT Tester.vi) that shows how to do this (LabVIEW 7.0). I think it will be fairly easy for you to modify for your own purposes.

Let me know if you have questions,
John
Message 4 of 6
(4,074 Views)
Hum, once again, I used the wrong button...
Chilly Charly    (aka CC)
0 Kudos
Message 5 of 6
(4,072 Views)
All,
Thank-you for the suggestions. It looks like ( at first glance) Johnner's example is exactly what I'm looking for. Now if I can just implement it. Again, thanks everyone.
Note: With LV being a "Graphical Language" National should have more examples/web pages dedicated to presenting the front panel vi ! Just a thought.
0 Kudos
Message 6 of 6
(4,047 Views)