LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I need these two contants?

Solved!
Go to solution

I cannot look at your code right now, but just by looking at the values of your constants, they furiously look like the offset between the origin of the front panel window (including the semi-transparent borders added by Windows 10) and the origin of the panel itself (where you place your controls).

 

Try using VI property "Front Panel Window -> Panel Bounds" instead of "Front Panel Window -> Window Bounds" and see if you can remove these constants.

 

As for the comment about the additionnal offset when the slider's label is visible, this case should probably be handled inside the subVI, not outside.

 

Regards,

Raphaël.

0 Kudos
Message 11 of 14
(116 Views)

@raphschru wrote:

Try using VI property "Front Panel Window -> Panel Bounds" instead of "Front Panel Window -> Window Bounds" and see if you can remove these constants..


 

Let's not overcomplicate things. As I demonstrated, none of these "corrections" and tweaks are needed if we use the mouse properties of the image. 😄

0 Kudos
Message 12 of 14
(97 Views)

Thank you for your time and trouble. I will go through your code and try to understand it.

 

Regards

Mark

0 Kudos
Message 13 of 14
(69 Views)

On a side note, I have written an idea to include the mouse properties as event data node for 2D pictures to simplify things.

 

Please all vote for it! Thanks!

0 Kudos
Message 14 of 14
(23 Views)