# Graphical User Interface

A LabWindows/CVI graphical user interface (GUI) can consist of panels, command buttons, pull-down menus, graphs, strip charts, knobs, meters, and many other controls and indicators. The following figure shows a typical GUI created with LabWindows/CVI. You can build a GUI in LabWindows/CVI interactively using the User Interface Editor, a drop-and-drag editor with tools for designing, arranging and customizing user interface objects. With the interactive User Interface Editor, you can build an extensive GUI for your program without writing a single line of code. When you are finished designing your GUI in the User Interface Editor, you save the GUI as a User Interface Resource (.uir) file.

If you attempt to open a .uir file you create in LabWindows/CVI 8.0 in LabWindows/CVI 7.1 or earlier, you might experience unexpected behavior, including a program crash. If you plan to open .uir files you create in version 8.0 in version 7.1, use the File»Save As or File»Save Copy As commands and select LabWindows/CVI 7.1 User Interface (*.uir) in the Save as type field.

When you save a LabWindows/CVI 8.0 .uir file in version 7.1 format, LabWindows/CVI removes any tab controls and images that include alpha-channel data from the .uir. LabWindows/CVI also removes any user interface features that were introduced in version 8.0, including graph annotations and menu images. You cannot save version 8.0 .uir files in pre-7.1 formats.

Objects in a Typical LabWindows/CVI GUI

In addition to the User Interface Editor, the User Interface Library has functions for creating or altering the appearance of the controls on your GUI during run time, so you can programmatically add to, change, or build your entire GUI.

Before creating your first GUI using LabWindows/CVI, you must understand the graphical objects that are available and how they operate.

- A panel is a rectangular region of the screen where controls and menu bars reside. Panels provide the backdrop for many different activities, such as representing the front panel instrument. You can also select from a group of pop-up panels.
- A menu bar is a mechanism for encapsulating a set of commands. A menu bar appears as a bar at the top of a panel and contains a set of menu titles.
- A control is an object that resides on a panel to accept input from the user and to display information. Controls can have a data type associated with it. The User Interface Library supports the following control types:

  Numeric Color Numeric Numeric Slide String Text Message Text Box Command Button Picture Button Toggle Button Text Button | Radio Button LED Binary Switch Ring Ring Slide Picture Ring List Box Tree Table Tab | Decoration Graph Strip Chart Digital Graph Picture Timer Canvas Splitter ActiveX

  To make a control ready to accept input, click on the control with the mouse or press <Tab> or <Shift-Tab> to move from control to control. Pressing <Alt> and the underlined letter in the label of the control makes that control ready to accept input, provided that no accessible menu bars contain a menu with the same underlined letter. On some controls, such as command buttons, pressing <Alt> and the underlined letter generates a commit event.

Developing and Running a Program

Creating Objects for a Graphical User Interface

Responding to Events in a Graphical User Interface