Jump to content

Front Panel: Difference between revisions

From LabVIEW Wiki
m Category reorg
Adding detail
Line 1: Line 1:
== Changing the front panel VI colour ==
{{underconstruction}}
Prior to LV7.0 there was no nice way to do this, however there are some workarounds. You can either place a large color box indicator covering the entire panel area and move it to the background. Changing the color of this indicator would look the same as changing the front panel color. Or, an alternative is to use a large boolean indicator and change it's colour via an atrribute node.
The '''Front Panel''' of a [[VI]] contains the [[User Interface]] of the VI.  The front panel can be simple with only a few inputs, ([[Controls|controls]]) and outputs ([[Indicators|indicators]]) for a SubVI or complex with many controls, indicators, and decoration for an application interface. The [[Controls Palette]] or [[Quick Drop]] is used to select the type of control, indicator, or decoration to add to the front panel. By default the size and position of the front panel will dictate its running size and position
{{TOCright}}
== Creating a Front Panel ==


Now in LV7.0 you can get a VI Server reference to the front panel and change the colour using a property node. Please see attached image.
=== Adding Controls ===
 
=== Adding Indicators ===
 
=== Organization Best Practices ===
For simple [[VI|VIs]], it is best practice to place inputs ([[Controls|controls]]) on the left side of the front panel and outputs ([[Indicators|indicators]]) on the right side of the front panel in a manner that matches their position on the [[Connector Pane]].
 
For complex UIs see the page on [[User Interface|User Interfaces]].
 
== Advanced==
=== Properties ===
Front panel properties and be accessed via a [[Panel refnum data type|panel refnum]] in the [[VI Server]].  See [[Panel class#Properties|Panel Properties]].
 
=== Methods ===
Front panel methods and be accessed via a [[Panel refnum data type|panel refnum]] in the [[VI Server]].  See [[Panel class#Methods|Panel Methods]].


== Minimize a caller VI while a subVI is running. ==
== Minimize a caller VI while a subVI is running. ==
Line 23: Line 39:
[[Category:User interface]]
[[Category:User interface]]
[[Category:LabVIEW fundamentals]]
[[Category:LabVIEW fundamentals]]
[[Category:Front Panel]]
[[Category:VI]]

Revision as of 15:52, 8 May 2020

The Front Panel of a VI contains the User Interface of the VI. The front panel can be simple with only a few inputs, (controls) and outputs (indicators) for a SubVI or complex with many controls, indicators, and decoration for an application interface. The Controls Palette or Quick Drop is used to select the type of control, indicator, or decoration to add to the front panel. By default the size and position of the front panel will dictate its running size and position

Creating a Front Panel

Adding Controls

Adding Indicators

Organization Best Practices

For simple VIs, it is best practice to place inputs (controls) on the left side of the front panel and outputs (indicators) on the right side of the front panel in a manner that matches their position on the Connector Pane.

For complex UIs see the page on User Interfaces.

Advanced

Properties

Front panel properties and be accessed via a panel refnum in the VI Server. See Panel Properties.

Methods

Front panel methods and be accessed via a panel refnum in the VI Server. See Panel Methods.

Minimize a caller VI while a subVI is running.

If you would like to minimize the caller VI, for example if you have a main VI that does essentially nothing while the subVI that it calls is executing, you need to reference your calling VI. So upon calling your subVI the first action would be to open a reference to your calling VI and size its front panel appropriately by using the VI Property Node. Then when exiting the subVI after completing execution you can restore the calling VI's front panel to its original size and close the reference.

Under Windows 98/2000 you can effect the above behavior with a couple of simple calls to the user32.dll API. First you get a handle to the window of the calling VI (or other Window) and then call either:

ShowWindow()

or

AnimateWindow()

The info on making the calls can be found for free at Microsoft at:

http://msdn.microsoft.com/library/default..../ShowWindow.asp

or by going to http://msdn.microsoft.com and search on ShowWindow or AnimateWindow.