This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

How to Set an Image as a Front Panel Background

Updated Mar 7, 2019

Reported In

Software

  • LabVIEW

Issue Details

How do I set an image as the background for my Front Panel?

Solution

LabVIEW 8.2 and later:
  1. Right-click a scrollbar of the Front Panel and select Properties from the context menu to open the Pane Properties dialog box.
 
  1. Activate the Background tab. Now either select one of the shipped images listed in the Background listbox, or click Browse to pick an image stored on your computer, adding it to the Background listbox temporarily.
 
  1. Click OK to close the dialog box and apply the image.


LabVIEW 8.0 and earlier:

There are two ways to set an image as the background of a Front Panel:

  • Drop an image on the front panel to import the image into LabVIEW as an object. Select the image, click the Reorder button, and select Move to Back from the pull-down menu. To make the image unselectable, select the image, click the Reorder button again, and select Lock from the pull-down menu. Finally, resize the front panel window to the size of the image.
     
  • Use a picture indicator to load background images programmatically while a VI runs:
    1. Place the appropriate Read [Picture type] File.vi (JPEG, PNG, or BMP) onto the block diagram.
    2. Wire a file path to the appropriate path to [type] file input to load desired background image.
    3. Place Draw Flattened Pixmap.vi on the block diagram.
    4. Wire the image data output from the Read Picture File VI to the image data input of the Draw Flattened Pixmap VI.
    5. Right-click the new picture output of the Draw Flattened Pixmap VI and select Create » Indicator.
    6. In the Front Panel window, resize the picture indicator to fill the panel. Follow the instructions of the previous method to move the indicator to the back and lock it.
    7. When running the VI, the picture indicator gets populated with the background image.

Figure 1: A code example for all three image types.
 

Additional Information

The programmatical approach of loading an image at run-time can also be used in current LabVIEW versions.

WAS THIS ARTICLE HELPFUL?

Not Helpful