Use the Display Message to User Express VI or the Prompt User for Input Express VI to display a standard dialog box that contains an alert or a message to users or prompts users to enter information, such as a user name and password.
You can use the Dialog (Base Package) and Dialog Using Events templates to assist in building dialog boxes. Select File»New to display the New dialog box, which lists all available built-in template VIs. The templates contain front panel and block diagram objects commonly used in dialog boxes.
 |
Note The Dialog Using Events template is available only in the LabVIEW Full and Professional Development Systems. |
Complete the following steps to create a custom dialog box that looks like a standard dialog box across all platforms.
- Use the Coloring tool to set the background color appropriate for the operating system.
- Use the following guidelines while building the front panel and block diagram of the VI.
- Assign key navigation for the front panel controls. Assign <Enter> for the OK button, <Escape> for the Cancel button, and <F1> to the Help button.
 |
Note Do not assign <Enter> for the OK button if the front panel has multi-line string controls. |
- Reduce the front panel window size to show only the objects you want to appear in the dialog box.
- Set the front panel window appearance as Dialog and enter a title for the dialog box title bar.
- Select File»VI Properties and select Window Appearance from the Category pull-down menu of the VI Properties dialog box.
- Select the Dialog option.
- Remove the checkmark from the Same as VI Name checkbox in the Window Title section to create a custom title that appears in the dialog box title bar. Enter the dialog box name in the field next to the checkbox.
- Click the OK button to save the changes and close the VI Properties dialog box.