Container Controls and Indicators

Use the container controls located on the Containers and Classic Containers palettes to group controls and indicators or to display the front panel of another VI on the front panel of the current VI. (Windows) You also can use container controls to display .NET and ActiveX objects on the front panel.

Tab Controls

Use tab controls to overlap front panel controls and indicators in a smaller area. A tab control consists of pages and tabs. Place front panel objects on each page of a tab control and use the tab as the selector for displaying different pages.

Tab controls are useful when you have several front panel objects that are used together or during a specific phase of operation. For example, you might have a VI that requires the user to first configure several settings before a test can start, then allows the user to modify aspects of the test as it progresses, and finally allows the user to display and store only pertinent data.

On the block diagram, the tab control is an enumerated type control. Terminals for controls and indicators placed on the tab control appear as any other block diagram terminal.

Subpanel Controls

Use the subpanel control to display the front panel of another VI on the front panel of the current VI. For example, you can use a subpanel control to design a user interface that behaves like a wizard. Place the Back and Next buttons on the front panel of the top-level VI and use a subpanel control to load different front panels for each step of the wizard.

When you place a subpanel control on the front panel, LabVIEW does not create a terminal for the control on the block diagram. Instead, LabVIEW creates an Invoke Node on the block diagram with the Insert VI method selected. To load a VI in the subpanel control, wire a reference to that VI to the Invoke Node.

Note��Because the subpanel control does not have a terminal, you cannot create an array of subpanel controls, and you cannot create a type definition of a subpanel control. You can place a subpanel control in a cluster to group the subpanel control with other controls, but the cluster cannot contain only a subpanel control or controls.

If the front panel of the VI you want to load is open or if you loaded the front panel in another subpanel control on the same front panel, LabVIEW returns an error, and you cannot load the front panel in the subpanel control unless the front panel is reentrant. You also cannot load the front panel of a VI in a remote application instance, and you cannot load front panels recursively.

If you load a VI that is not running, the VI in the subpanel control loads in edit mode.

LabVIEW displays only the visible area of the front panel of the VI you load in the subpanel control. After you stop running the VI that contains the subpanel control, LabVIEW clears the front panel in the subpanel control. You also can use the Remove VI method to unload the VI in the subpanel control.

Refer to the labview\examples\Controls and Indicators\Containers\Containers.lvproj for examples of using subpanel controls.

Open example� Find related examples