How Do I Scale All of the Objects of My Front Panel with the Window Size?

Updated Jan 2, 2018

Reported In

Software

  • LabVIEW Full

Issue Details

If I want to scale an object on my front panel with the window size, I click on the object and select Edit » Scale Object with Panel. However, after I scale one object, this option is greyed out and I can not scale any other objects. How can I scale multiple objects with the window size?

Solution

Scaling a group of objects
In order to scale multiple objects on the front panel, you must have all of the objects grouped as one. Select all of the objects by clicking on each one while holding the Shift key or by dragging a box around them. Now, with everything highlighted, go to the Front Panel Toolbar and click Reorder » Group. Once all of the objects are grouped as one, click on any object and select Edit » Scale Object with Panel. All of the grouped objects will now scale with the window. 

Note: If you ungroup the objects, scaling will no longer be set. You can also undo scaling by selecting your group or individual object and again selecting Edit » Scale Object with Panel

Scaling all objects
If you want to scale all the objects in your front panel you can also go to File » VI Properties and select Window Size in the drop-down Category menu. In this dialog box check the Scale all objects on front panel as the window resizes box. However, note that the text labels on your front panel will not scale when the window is re-sized because they are set to a fixed font size. There are a few work arounds if you need your application to work in different screen resolutions:
  1. You can design different front panels for different screen resolutions and then programmatically select the correct front panel based on the current screen resolution.
     
  2. You can replace your front panel labels with string indicators. With the string indicators you can programmatically change the size of the text size based on the current resolution (shown below). However, there are two hurdles with this solution. First in order to make the string indicators look like a text label, you need to customize them. You can find more information by searching Creating Custom Controls and Indicators from the Front Panel in the help. The second hurdle is the string control needs to be resized for the largest size the font will be otherwise the indicator field will cut the text off (this can be done be developing it in a 800 x 600 resolution environment).

 
  1. Finally, you can also design the front panel in the lowest resolution your application will support (probably 800 x 600) and as the front panel is scaled with resolution there is less of a chance that the fixed text labels will interfere with the scaling of the front panel objects. However, this workaround will result in a high resolution screen layout that may not be optimum.

Additional Information


In LabVIEW 7.1 or earlier, refer to the LabVIEW User Manual (linked below) for more information on scaling front panel objects. The relevant section, Scaling Front Panel Objects, starts on page 4-7. In LabVIEW 8.0 or later, refer to the Scaling Front Panel Objects topic in the LabVIEW Help (linked below).

WAS THIS ARTICLE HELPFUL?

Not Helpful