LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use a mouse to interact within a radar screen simulator?

I have this radar screen simulator and I need now to use the mouse to select a plane from the screen and display some information about it and measure it's distance from the center of the screen?
0 Kudos
Message 1 of 5
(3,196 Views)
Use the mouse down event to detect when the user has clicked somewhere on the front panel. It gives the coordinates of the click. Define a closeness criteria and see if any of the planes have coodinates within that range, if there is - lock on to the nearest of those planes.
Message 2 of 5
(3,196 Views)
WHAT IF I WANT TO HIGHLIGHT A FLIGHT WHEN I LEFT CLICK
USING THE MOUSE.HOW COULD IT BE DONE?
0 Kudos
Message 3 of 5
(3,196 Views)
As far as I remember you are now using a picture control as the plane(s)...highlighting it using the standard highlight property won't work, but you could e.g. swap to a different picture / pict. control if the plane was close to the click coordinates. The mouse down? event will tell you which button was clicked...
0 Kudos
Message 4 of 5
(3,196 Views)
> WHAT IF I WANT TO HIGHLIGHT A FLIGHT WHEN I LEFT CLICK
> USING THE MOUSE.HOW COULD IT BE DONE?

If you are drawing everything, the choice is yours. First detect the
click and change the hilight values for the plane(s). During drawing
pay attention to this field to select color, decide whether or not to
fill the graphic, draw a circle around the plane, or combine it with a
timer and make the plane flash back and forth between two colors.

Greg McKaskle
0 Kudos
Message 5 of 5
(3,196 Views)