How to Justify the Text in a Control or Indicator on a LabVIEW Front Panel?

Updated Jul 27, 2022

Environment

Software

  • LabVIEW

How can I left-, center-, or right-justify the text in a control or indicator on a LabVIEW front panel? How do I do this programmatically in LabVIEW?

Use the Position/Size/Select tool (on the Tools Palette) to click on a control or indicator whose text you wish to justify. After the control has been selected, click on the down arrow of the Text Settings in the LabVIEW toolbar. Select Justify from the drop-down menu. The sub menu that appears allows you to select LeftCenter, or Right justification.

Alternatively, you can click on the control or indicator and then click on the down arrow of the Text Settings in the LabVIEW toolbar. Select Justify from the drop-down menu. The sub menu that appears allows you to select LeftCenter, or Right justification, as shown below:




To do this programmatically in LabVIEW, a property node can be used to specify the justification. to do this, find the control/indicator on the block diagram, right click and select Create » Property Node » Text » Justification. Alternatively you could place down an unassigned property node, and select the Justification in the same way. To do this for a control/indicator with more than one cell, for example a table, right click the table control/indicator on the block diagram and select Create » Property Node » Active Cell » Cell Justification.  You can then specify the justification for both with an Enum constant as shown below:



This justification will be applied to all of the text in the selected control, indicator, or cells. In both cases, the contents of the controls will be moved/justified to the left. 

Additional Information

Note: There is no direct way to vertically center the text inside of Ring controls and Enumerator controls.