O'Reilly logo

LabVIEW Graphical Programming Cookbook by Yik Yang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sizing the dialog automatically

The size of the dialog is adjusted and saved manually, so that only what is intended to be seen is shown when the dialog appears. However, every time when a dialog is modified, the size may need to be adjusted again. To avoid the trouble of adjusting the front panel every time when a change is made, this recipe provides a way to size a dialog automatically.

How to do it…

To start building the VI to size a dialog automatically, we need to execute the following steps:

  1. We open a new project and VI.
  2. Create the block diagram as shown in the following screenshots. The six values contained in enum are Initialize, Find Max Height, Set Origin, Set Panel Bounds, Center FP, and Shutdown. The first state Initialize gets the VI ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required