LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pictureframe coordinates

Solved!
Go to solution

Hi,

 

I have a VI with a pictureframe, now i want to have the coordinates of my mouse when i click in the pictureframe but i also want the coordinates of my mouse when i click the pane... I only get the coordinates of the pane...?

 

Is this a bug in LabVIEW?

Regards,

Thijs 

0 Kudos
Message 1 of 2
(1,997 Views)
Solution
Accepted by topic author ThijsBoeree

The mouse down data is always in pane coordinates. You need to translate it to the picture coordinates by using a property node to get the Position property of the picture indicator and subtract that from the coords you get. Note that the label and the border of the picture are also factored in the position property, so you need to account for them. I would suggest hiding the label and subtracting a constant value for the frame.

 

Also note that the origin of the picture indicator itself can be modified, so if you do that, you might also need to get the origin property of the picture control to account for that.


___________________
Try to take over the world!
Message 2 of 2
(1,983 Views)