User Interface Editor
A LabWindows/CVI Graphical User Interface (GUI) can consist of panels, command buttons, pull-down menus, graphs, strip charts, knobs, meters, and other controls and indicators.
You can create a GUI programmatically using function calls, or 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.
Use the User Interface Editor to create panels, controls, and menu bars. Panels in the User Interface Editor contain grid lines that you can use to align and resize controls. When you finish designing your GUI in the User Interface Editor, save the GUI as a user interface resource (.uir) file. To open the User Interface Editor, select File»New or File»Open and select User Interface (*.uir).
User Interface Editor Tools
You can use the mouse to edit the user interface in four different modes. When you click a particular mode tool, the mouse cursor changes to reflect the new editing mode.
![]() |
Operate Tool—Use the Operate Tool to operate objects. When you are in operate mode, events and event data values are tracked in the User Interface Event Logger. Panel grid lines do not appear in operate mode. |
![]() |
Edit Tool—Use the Edit Tool to select, position, and size objects. When the User Interface Editor is in edit mode, you can double-click a control to edit it. You also can select multiple controls of the same type and then double-click the selection to edit them together. |
![]() |
Edit Text Tool—Use the Edit Text Tool to modify text associated with objects. |
![]() |
Paint Tool—Use the Paint Tool to color objects. Right-click the panel to view a color palette from which you can choose a color. Clicking the panel automatically colors the object with the last color you selected in the color palette. |
![]() |
Hold down the <Ctrl> key on the panel to change the Paint Tool to an Eyedropper Tool. When you click an object with the Eyedropper Tool, the current color of the tool becomes the color of that object. Then you can apply that object's color to another object. |
Using the Context Menus of the User Interface Editor
To open a context menu, right-click the User Interface Editor. The type of context menu that appears depends on the surface you click. The following list describes the areas in the User Interface Editor that open context menus.
- If you click the User Interface Editor background, a context menu appears with options to create a panel or a menu bar.
- If you click a panel background, a context menu appears with options to create each of the control types available in LabWindows/CVI.
- If you click a control, a context menu appears with commands with the following options:
- Generate Control Callback—Generates the #include statements and the function skeleton for the selected control and places the code in the target file.
- View Control Callback—Opens the source file that contains the control callback and highlights the callback function name.
- Generate ActiveX Control DriverLaunches the ActiveX Controller Wizard. This option is available only for ActiveX controls.
- Generate Custom Control Code—Generates code for the custom control. This option applies only to custom controls with code associated with them. This option inserts the code from the template file associated with the custom control and places the code under the call to LoadPanel. LabWindows/CVI adds the program file associated with the control to the project.
- Create Control Array/Add to Control Array—Creates an array of the controls selected or adds selected controls to an existing array. Use the User Interface Browser to locate existing arrays of controls interactively.
- Control Help—Opens the LabWindows/CVI Help to the control overview for the selected control.
- Edit Control—Opens the Edit Control dialog box.
- Properties—Opens the property sheets for the selected control. This option is available only for ActiveX controls.