Solution
The
Position properties for a front panel object correspond to its position in the front panel window, not on your computer screen.
Setting an object's
Position:Top and
Position:Left properties to 0 will typically place it slightly above the visible origin in the front panel window. This is because
(0,0) in the front panel is hidden behind the menu bar and toolbar. Placing an object at
(0,43) will position it at the visible origin. This setting persists when running a VI in a dialog box, so an object at
(0,43) will still appear at the origin. However the origin also persists when you use the scrollbars in the front panel window, so that
(0,0) might not always be the correct origin. Use the
FP.Origin property to obtain the correct origin.
To position an object at the center of your screen, you should use the
FP.Origin and
FP.PanelBounds properties to calculate the correct center of the front panel window, then use the object's
Position:Left and
Position:Top properties to situate it on the center. See the following example of how to do this.
In LabVIEW 7.1 or earlier, refer to the
LabVIEW Documentation for more information about the Position properties. In LabVIEW 8.0 or later, refer to the
GObject Properties topic in the LabVIEW help.