LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

indicator position relative to what?

I am trying to determine the position of a string indicator relative to the screen 0,0 point. I can get the Front Panel position relative to the 0,0 point, however the reported top position of the indicator doesn't appear to be relative to any usefull point (unless I am missing something...). The indicator is 100 pixels below the window bounds but is reported as 200, when I have run the window top is at 203, so if the indicator is relative to the windows bounds I would have expected the indicator top to be at approx 100 or approx 300 if relative to the screen. Attached is an example VI illustrating the problem. If someone can point out whether I am flawed (well I am but...) that would be appreciated.
Cheers, Wayne.
0 Kudos
Message 1 of 2
(2,758 Views)
All of the items on the front panel report their position relative to the 0,0 point of the panel.

You can find the 0,0 point of the panel by turning on the front panel grid and looking for the point where the two heavier lines cross with a dot. See the attached image, this shows the 0,0 point. If you move the controls upper left corner to this point, you'll see the control now shows a 0,0 position.

If you want the controls position relative to entire screen, use the Front Panel Window:Window Bounds property to get the window position and a bit of math to calculate where the control is relative to that.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 2
(2,758 Views)