Solution
This is possible by using the
FP.PanelBounds property of the current VI and the
Bounds property of the control or indicator that you want to center. These properties can be used to calculate the center coordinates of the Front Panel window and then update the object's
Position property accordingly.
Review the following LabVIEW snippet, which centers a Boolean indicator within the Front Panel window regardless of the window size.
-
The Property Node and the This VI reference can be found in the Application Control palette on the block diagram.
-
References for controls and indicators can be created by right clicking the object and selecting Create>>Reference.
Note: To use a snippet, right-click the image, save it as a PNG file, and drag the PNG file onto a LabVIEW block diagram.