You are on page 1of 6

Configuring Front Panel Objects

Table of Contents
LabVIEW 2014 Help
Edition Date: June 2014
Part Number: 371361L-01
View Product Info
Use Properties dialog boxes or shortcut menus to configure how constants, controls, indicators,
and Numeric functions appear or behave. Use Properties dialog boxes when you want to configure a
constant, control, indicator, or Numeric function using a dialog box that includes context help and in
which you can set several properties at the same time for an object. Use shortcut menus to quickly
configure common constant, control, indicator, and function properties. The options available
in Properties dialog boxes and shortcut menus differ for different objects. Most options you set using a
shortcut menu are reflected in the Properties dialog box, and most options you set using
the Properties dialog box are reflected in the shortcut menu.
Right-click a constant, control, indicator, or Numeric function and select Properties from the shortcut
menu to display theProperties dialog box for that object. You cannot display Properties dialog boxes
while a VI runs.
Tip To perform a common operation on multiple objects simultaneously, select the objects and
use the shortcut menu or the Properties dialog box.
You also can create a custom control or indicator to extend the available set of front panel objects.
Right-click the control and select AdvancedCustomize from the shortcut menu to customize a control
or indicator. You can save a custom control or indicator you created in a directory or LLB and use the
custom control or indicator on other front panels.

Showing and Hiding Optional Elements


Front panel controls and indicators have optional elements you can show or hide, such as labels,
captions, and digital displays. Set the visible elements for the control or indicator on
the Appearance page of the Properties dialog box for the front panel object. You also can set the visible
elements by right-clicking an object, selecting Visible Items from the shortcut menu, and selecting
among the available options.

Changing Controls to Indicators and Indicators to Controls


LabVIEW initially configures objects in the Controls palette as controls or indicators based on their
typical use. For example, if you place a toggle switch on the front panel, it appears as a control because
a toggle switch is usually an input mechanism. If you place an LED on the front panel, it appears as an
indicator because an LED is usually an output device.
Some palettes contain a control and an indicator for the same type or class of object. For example,
the Numeric palette contains a numeric control and a numeric indicator because you can have a
numeric input or a numeric output.
You can change a control to an indicator by right-clicking the object and selecting Change to
Indicator from the shortcut menu, and you can change an indicator to a control by right-clicking the
object and selecting Change to Control from the shortcut menu.

Replacing Front Panel Objects


You can replace a front panel object with a different control or indicator. When you right-click an object
and select Replacefrom the shortcut menu, a temporary Controls palette appears. Select a control or
indicator from the temporary Controls palette to replace the current object on the front panel.
Selecting Replace from the shortcut menu preserves as much information as possible about the original
object, such as its name, description, default data, dataflow direction (control or indicator), color, size,
and so on. If you replace a numeric terminal with another numeric terminal, LabVIEW tries to preserve
the original representation. However, if the control does not support the new data type, the new object
retains its own data type. Wires from the terminal of the object or local variables remain on the block
diagram, but they might be broken. For example, if you replace a numeric terminal with a string
terminal, the original wire remains on the block diagram, but is broken.
The more the new object resembles the object you are replacing, the more original characteristics you
can preserve. For example, if you replace a slide with a different style slide, the new slide has the same
height, scale, value, name, description, and so on. If you replace the slide with a string control instead,

LabVIEW preserves only the name, description, and dataflow direction because a slide does not have
much in common with a string control.
You also can EditCopy and Paste to copy objects to the clipboard and paste them from the clipboard
to replace existing front panel controls and indicators. This method does not preserve any characteristics
of the old object, but the wires remain connected to the object.

Configuring the Front Panel


Table of Contents
LabVIEW 2014 Help
Edition Date: June 2014
Part Number: 371361L-01
View Product Info
You can customize the front panel by setting the tabbing order of front panel objects, by using imported
graphics, by setting front panel objects to automatically resize when the window size changes, and so
on.

Setting Keyboard Shortcuts for Controls


You can assign keyboard shortcuts to controls so users can navigate the front panel without a mouse.
Right-click the control and select AdvancedKey Navigation from the shortcut menu to display
the Key Navigation page of the Properties dialog box.
Note LabVIEW does not respond to keyboard shortcuts for hidden controls.

When a user presses a keyboard shortcut while a VI runs, the associated control receives the focus. If
the control is a text or numeric control, LabVIEW highlights the text so you can edit it. If the control is
Boolean, press the spacebar, the <Enter>, or the <Enter> key on the numeric keypad to change its
value.
The AdvancedKey Navigation shortcut menu item is dimmed for indicators because you cannot
enter data in an indicator.
Note You also can use the Key Down event to generate an event when the user presses a
specific key on the keyboard.
Controlling Button Behavior with Key Navigation
You can associate function keys with various buttons that control the behavior of a front panel.
Note (Mac OS X) Keyboard shortcuts for the function keys work only if the function keys are
not assigned as shortcut keys for Expos. LabVIEW does not support <VolumeUp>,
<VolumeDown>, and function keys <F15> to <F24> as shortcut keys on Mac OS X.
You can configure a button in a VI to behave like a dialog box button so that pressing the <Enter> key
on the alphanumeric keyboard or the <Enter> key on the numeric keypad is the same as clicking the
button. If you associate either <Enter> key with a dialog box button, LabVIEW automatically draws that
button with a thick border around it.
If you navigate to a Boolean control and press the <Enter> key, the Boolean control changes, even if
another control uses the <Enter> key as its keyboard shortcut. The assigned <Enter> keyboard shortcut
applies only when a Boolean control is not selected.
Setting the Tabbing Order of Front Panel Objects
Controls and indicators on a front panel have an order, called tabbing order, that is unrelated to their
position on the front panel. LabVIEW determines tabbing order based on the order in which you place
controls on the front panel. The first control or indicator you create on the front panel is element 0, the
second is 1, and so on. If you delete a control or indicator, the tabbing order adjusts automatically.
The tabbing order determines the order in which LabVIEW selects controls and indicators when the user
presses the <Tab> key while a VI runs. The tabbing order also determines the order in which the

controls and indicators appear in the records of datalog files you create when you log the front panel
data.
You can set the tabbing order of front panel objects by selecting EditSet Tabbing Order.
To prevent users from accessing a control by pressing the <Tab> key while a VI runs, place a
checkmark in the Skip this control when tabbing checkbox in the Key Navigation page of
the Properties dialog box.
Note If you add a splitter bar to the front panel and create panes the tabbing order of objects
on the front panel does not change. A control in any pane can be the next control in the
tabbing order.

Coloring Objects
You can change the color of many objects in LabVIEW. You can change the color of most front panel
objects, panes on the front panel, and block diagram workspaces. You cannot change the color
of system controls and indicators because these objects appear in the colors you have set up for the
system.
Use the Coloring tool to right-click an object or workspace to change the color of front panel objects,
panes on the front panel, and block diagram workspaces. You also can change the default colors for
some objects by selecting ToolsOptions and selecting Environment from the Category list.
Color can distract the user from important information. Use color logically, sparingly, and consistently, if
at all. For example, never use color as the sole indicator of device state. People with some degree of
color-blindness can have problems detecting the change.

Using Imported Graphics


You can import graphics from other applications to use as pane backgrounds, items in ring controls, and
parts of other controls and indicators.
LabVIEW supports most standard graphic formats, including BMP, JPEG, animated GIF, MNG, animated
MNG, and PNG. LabVIEW also supports transparency.
However, imported graphics might slow down screen updates. Make sure you do not place indicators and
controls on top of a graphic object so that LabVIEW does not have to redraw the object each time the
indicator updates.
Tip If you must use a large background picture with controls on top of it, divide the picture
into several smaller objects and import them separately because large graphics usually take
longer to draw than small ones.
Use one of the following ways to import a graphic.
Windows
Mac OS X
Linux
Tip Check how the imported graphics look when you load the VI on another platform. For
example, a Macintosh PICT file that has an irregular shape might convert to a rectangular
bitmap with a white background on Windows or Linux.
After you import a graphic, you might need to resize or reorder the image. You cannot resize imported
GIFs.
Importing Graphics to the Front Panel
You can import graphics for front panel backgrounds using either of the following ways.

Right-click the scroll bar of a pane and select Properties from the shortcut menu to display
the Pane Propertiesdialog box. On the Background tab, use the Background, Browse,
and Position options to set a pane background image.

Copy the graphic to the clipboard and paste it on the front panel. You also can select EditImport
Picture to Clipboard and paste the graphic on the front panel.

Note (Windows and OS X) If you import an image by copying and pasting it, the image
loses any transparency.

Aligning and Distributing Objects


Select EditEnable Panel Grid Alignment to enable the grid alignment on the front panel and align
objects as you place them. Select EditDisable Panel Grid Alignment to disable the grid alignment
and use the visible grid to align objects manually. You also can press the <Ctrl-#> keys to enable or
disable the grid alignment. On French keyboards, press the <Ctrl-> keys.
(OS X) Press the <Command-*> keys. (Linux) Press the <Alt-#> keys.
You also can use the alignment grid on the block diagram. When objects are aligned and distributed
evenly, you can use straight wires to wire the objects together. This makes the block diagram easier to
read.
Select ToolsOptions and select Front Panel from the Category list to hide or customize the grid.
To align objects after you place them, select the objects and select the Align Objects pull-down menu
on the toolbar or selectEditAlign Items. To space objects evenly, select the objects and select
the Distribute Objects pull-down menu on the toolbar or select EditDistribute Items.

Grouping and Locking Objects


Use the Positioning tool to select the front panel objects you want to group and lock together. Click
the Reorder button on the toolbar and select Group or Lock from the pull-down menu. Grouped
objects maintain their relative arrangement and size when you use the Positioning tool to move and
resize them. Locked objects maintain their position on the front panel. You cannot delete grouped or
locked objects from the front panel or the block diagram until you ungroup or unlock them. You can set
objects to be grouped and locked at the same time. If you set objects to be grouped and locked at the
same time, you must ungroup and unlock them before you can delete them from the front panel or the
block diagram. Tools other than the Positioning tool work normally with grouped or locked objects.

Resizing Objects
You can change the size of most front panel objects. When you move the Positioning tool over a
resizable object, resizing handles appear at the points where you can resize the object. When you resize
an object, the font size remains the same. Resizing a group of objects resizes all the objects within the
group.
Some objects change size only horizontally or vertically when you resize them, such as digital numeric
controls and indicators. Others keep the same proportions when you resize them, such as knobs. The
Positioning cursor appears the same, but the dashed border that surrounds the object moves in only one
direction.
You can manually restrict the growth direction when you resize an object. To restrict the growth
vertically or horizontally or to maintain the current proportions of the object, press the <Shift> key
while you click and drag the resizing handles. To resize an object around its center point, press the
<Ctrl> key while you click and drag the resizing handles. To restrict the growth vertically or horizontally
or to maintain the current proportions of the object and to resize an object around its center point, press
the <Ctrl-Shift> keys while you click and drag the resizing handles.
(OS X) Press the <Option> key in place of the <Ctrl> key. (Linux) Press the <Alt> key in place of the
<Ctrl> key.
To resize multiple objects to the same size, select the objects and select the Resize Objects pull-down
menu on the toolbar. You can resize all the selected objects to the width or height of the largest or
smallest object, and you can resize all the selected objects to a specific size in pixels. If you add splitter
bars to the front panel and create panes, you can select different objects on multiple panes by pressing
the <Shift> key and selecting the objects you want to resize.

Scaling Front Panel Objects


You can set front panel objects to scale, or automatically resize in relation to the pane size, when you
resize the pane. You can set one object on the front panel to scale, or you can set all objects on an
owning pane to scale. However, you cannot set multiple objects to scale on the front panel unless you
set all of them to scale, you group the objects first, or the objects are on separate panes. You also can
set a single object to fill a pane.

To set a single object to scale automatically when the pane resizes, right-click the object and
select Scale Object with Panefrom the shortcut menu. If you set a single front panel object to scale,
the object resizes itself automatically in relation to any change in the pane size. The other objects on the
front panel reposition themselves to remain consistent with their previous placement on the front panel
but do not scale to fit the new size of the pane.
Immediately after you designate a single object on the front panel to scale automatically, gray lines
outline several regions on the front panel, as shown in the following front panel. The regions define the
positions of the other front panel objects in relation to the object you want to scale. When you resize the
pane, the object you set to scale automatically resizes and repositions itself relative to its original
location. The gray lines disappear when you run the VI.

To set objects in an owning pane to scale automatically while the pane resizes, right-click a splitter bar
and select Pane SizingScale Objects While Resizing from the shortcut menu. An item that scales
on the pane will scale while you are resizing the pane instead of when you are finished resizing the
pane. To set all objects in an owning pane to scale automatically when the pane resizes, right-click a
splitter bar and select Pane SizingScale all Objects with Pane from the shortcut menu of the
appropriate pane. If you set all objects on a pane to scale, all objects resize and reposition automatically
in relation to any change in the pane size. If you set all objects on a pane to scale and a single object on
the pane is already set to scale, a dialog box appears that prompts you to select between setting
automatic scaling for the one object or for all objects on the pane. You also can use the Set Scaling
Mode method to set all the pane's objects to scale programmatically.
When LabVIEW scales objects automatically, it follows the same conventions as when you resize an
object manually. For example, some objects can resize only horizontally or vertically, and the font size
remains the same when you resize an object.
After LabVIEW automatically scales an object, the object might not scale back to its exact original size
when you size the pane back to its original position. Before you save the VI, select EditUndo to
restore the original front panel window and object sizes.
You can set an array to scale or set the objects within an array to scale. If you set the array to scale,
you adjust the number of rows and columns you can see within the array. If you set the objects within
the array to scale, you always see the same number of rows and columns, though different sizes, within
the array.
You also can set a cluster to scale or set objects within the cluster to scale. If you set a cluster to scale,
the objects within the cluster do not scale. If you set objects within the cluster to scale, the cluster does
not scale unless you right-click the cluster and select AutoSizingSize to Fit from the shortcut menu.
To set a single object to fill the pane, right-click the object and select Fit Control to Pane from the
shortcut menu. The object should be the only object in the pane, otherwise other objects are overlapped
by the object you select to fit to the pane. The object resizes itself to fill the pane, and automatically
resizes in relation to any change in the pane size.

Adding Space to the Front Panel without Resizing the Window


You can add space to the front panel without resizing the window. To increase the space between
crowded or tightly grouped objects, press the <Ctrl> key and use the Positioning tool to click the front
panel workspace. While holding the key combination, drag out a region the size you want to insert.
(Mac OS X) Press the <Option> key. (Linux) Press the <Alt> key.

A rectangle marked by a dashed border defines where space will be inserted. Release the mouse button
and the key to add the space.

You might also like