Arranging, Decorating, Resizing, Grouping, and Locking


One way to improve the appearance of your front panel is to organize the objects by deciding where to place them on the panel. You can do this by aligning and distributing your objects evenly and by grouping sets of objects that are logically related onto or inside a decoration.

LabVIEW provides you with the ability to align, distribute, resize, group, and lock objects, much like a drawing program, as we saw in Chapter 4, "LabVIEW Foundations." You have a variety of choices for how to align your objects. Distribution of objects refers to the spacing arrangement between objects. Resizing allows you to select multiple objects and adjust their height and/or width to that of the smallest or largest object in the selection of objects. Grouping objects allows you to easily move a set around without disturbing their relative arrangement. And locking objects helps keep them from being accidentally selected or resized. In addition, you can change the z-order, or depth placement (what's in front and what's behind), of any object. All of this graphical control is done with the toolbar set you'll find on the VI window (see Figure 17.3).

Figure 17.3. Align, Distribute, Resize, and Reorder toolbar buttons


You will quickly realize that LabVIEW considers an object's label to be part of the object when it performs alignment and distribution (but not for resizing) operations. If this is not the behavior that you desire, you can temporarily hide the offending object labels by selecting Visible Items>>Label from each object's pop-up menu, and then selecting that option again for each object to restore the labels.

Also, remember that the label of an object can be placed anywhere you want to, but it remains attached to (and part of) that object.


By now you may have noticed the Modern>>Decorations subpalette in the Controls palette (see Figure 17.4).

Figure 17.4. Decorations palette


These front panel decorations are just thatthey don't do anything, and they have no corresponding block diagram terminal. You can use these boxes, lines, frames, and so on, to encapsulate and group your front panel controls and indicators into logical units. You might also use them to approximate the front panel of an instrument more closely.

Often you'll have to make use of the previously mentioned z-order functions, such as Move To Back, to place the decorations "behind" your controls. The reason for these commands is obvious once you create a decoration to enclose a set of controls: decorations aren't normally transparent, so if you place a decoration on the front panel after you create the controls, the decoration will obscure them because it is at the "front."

Clicking on a decoration is not the same as clicking on a blank part of the front panel. When using decorations behind controls, it's easy to unintentionally select the decoration with the cursors in the edit mode. The exception to this warning is the set of "frame" decorations, which are only "clickable" on the edge of the frame.


Once you are happy with the size and location of a frame (or other) front panel decoration, lock it in place so that it cannot be moved. Do this by selecting the decoration and then click the Reorder button on the toolbar and select Lock. To unlock, follow the same process, but instead select Unlock.





LabVIEW for Everyone. Graphical Programming Made Easy and Fun
LabVIEW for Everyone: Graphical Programming Made Easy and Fun (3rd Edition)
ISBN: 0131856723
EAN: 2147483647
Year: 2006
Pages: 294

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net