Programmatically Show or Hide the Front Panel Scroll Bars

Updated Dec 15, 2022

Environment

Software

  • LabVIEW

How can I show or hide the front panel scroll bars of a VI or global variable programmatically?

In LabVIEW 6.0 and later, you can use Property Nodes to programmatically show or hide the front panel scroll bars. LabVIEW 8.0 introduces panes on the front panel. This feature makes it possible to scroll sections of the front panel independently.

LabVIEW 8.0 and later

  1. Use the Property Node located on the Functions»Programming»Application Control palette.
  2. Right-click the Property Node and select Select Class»VI Server»VI»VI. By default, this references the current VI.
  3. Right-click Property on the bottom half of the Property Node and select Properties»Front Panel.
  4. Create another Property Node.
  5. Wire the second Property Node reference to Panel.
  6. Right-click Property on the second Property Node and select Properties»Panes[].
  7. Create another Property Node.
  8. Create a For Loop around the third Property Node to access all pane refnums or use the Index Array function to access a specific pane's refnum.
  9. Wire the Panes[] reference through the For Loop or through Index Array function to the third Property Node. Your wire should be a single refnum instead of an array. See the image below. 

  10. Right-click Property on the third Property Node and select Properties»Horizontal Scrollbar Visibility.
  11. Create three Close Reference VIs from the Functions»Programming»Application Controlpalette.
  12. Wire each reference from the three property nodes to a Close Reference VI.
  13. Right click on the HorizScrollbarVisibility and VertScrollbarVisibility property nodes and select Change to Write.
  14. Right click the HorizScrollbarVisibility and VertScrollbarVisibility inputs and select Create»Constant or Control.

LabVIEW 6.0 through 7.1 

  1. Use the Property Node located on the Functions»Application Control palette.
  2. Right-click the Property Node and select Select VI Server Class»VI. By default, this references the current VI.
  3. Right-click Property on the bottom half of the Property Node and select Properties»Front Panel Window»Show Scroll Bars.
  4. Creat a boolean control or constant and wire it to the FP.ShowScroll property. 
  5. Create a Close Reference VI from the Functions»Application Control palette.
  6. Wire the reference from the property node to a Close Reference VI.

Restoring scroll bars to a global variable

  1. Select Functions»Programming»Application Control»Open VI Reference and place it on the block diagram.
  2. Right-click the VI path input of the Open VI Reference VI and select Create»Constant.
  3. Type in the file path to the global variable.
  4. Run the VI.  The scroll bars will return to the front panel of the global variable.