LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display the coordination of cursor on a picture indicator

Solved!
Go to solution

Hello,

 

I use a picture indicator to show the results from a pressure measurement, because it is a 2D distribution.

I'd like to show the position of the cursor when it moves in. It should look like the tip strip but change dynamically according to the positions.

There're here two examples for the indicator.

 

Thanks for your answers!

 

 

Snap1 Snap2

 

Message Edited by wilburwu on 04-16-2009 04:27 AM
0 Kudos
Message 1 of 4
(3,285 Views)

 Few pointers:

  1. Host your images with NI (here's a little how to), I don't need to see porn
  2. Use the Code Capute tool to create screenshots from LabVIEW code
  3. Show what you have done allready

Now ontopic:

use an event structure to get the Mouse Move event for the picture control, substract the controls position to get the actual coordinates inside the picture control.

Divide this coordinate by the 'square size' you use.

Use the Tipstrip property  to write the string containing the coordinates.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 2 of 4
(3,272 Views)

Hello Ton,

 

thanks for the tips for using the images in the forumSmiley Wink

I've written an event similar as your advise.

But the problem is the Strip is not always shown (which is important for this indicator!). And there's hesitation before the strip is displayed.

 

I want the strip to be shown as in the slide. Once the mouse is in the picture, the strip is ALWAYS visible.

 

Thanks

0 Kudos
Message 3 of 4
(3,259 Views)
Solution
Accepted by topic author wilburwu

Use the attached codesnippet inside your event structure:

 

 

You can hide the string control when the mouse leaves the picture.

 

Ton

Message Edited by TonP on 04-17-2009 08:44 AM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Download All
Message 4 of 4
(3,242 Views)