How Do I Scale Front Panel Controls With Pane?

Updated Dec 10, 2017

Reported In

Software

  • LabVIEW Full

Issue Details

How do I scale a Front Panel control with the pane so that resizing the Front Panel resizes the control?

Solution

When scaling with the pane, you can choose to scale all objects on the Front Panel, or to scale only specific objects. Both of these options can be done either manually or programmatically.
 
  • Manual Method:
    In order to scale all objects on the Front Panel so that resizing the Front Panel window resizes all of the Front Panel objects as well, complete the following steps:
    1. Open VI Properties by selecting File»VI Properties.
    2. Select Window Size from the Category menu.
    3. Place a checkmark in Scale all objects on front panel as the window resizes*.

    Note: This option only applies to single pane panels.

    In order to set this property for an individual control or indicator, right-click the object and select Scale Object with Pane.
     

  • Programmatic Method: 
    You can also programmatically turn this option on or off in LabVIEW. To achieve this functionality, complete the following steps:
    1. Place a VI Server Reference on the Block Diagram.
    2. Right-click and create a Property for VI Class that is Front Panel
    3. Right-click Panel and create a Property for VI Class that is Panes[ ].
    4. Wire the output of Panes[ ] into the Array Input of an Index Array.vi.
    5. Right-click the output of the Index Array and create a Method for Pane Class that is Set Scaling Mode.
    6. Right-click the Scaling Mode option and create a constant.
    7. Choose either No Scaling, Scale All Objects, or Scale Single Object depending on the programmatic functionality you wish to achieve.

WAS THIS ARTICLE HELPFUL?

Not Helpful