Admin Production ni-theme
Current Publication

Cutting and Pasting Controls

LabWindows/CVI

Cutting and Pasting Controls

You frequently might want to cut and paste controls. In this example, you copy controls from one panel to another. Complete the following steps to copy a control:

  1. Make sure the function panel from the previous example is active and in edit mode. Position the cursor on the Volts/Div control and select Edit»Control Help.
  2. Enter the following text in the Help Editor dialog box:
    This control specifies the volts per division setting of the oscilloscope.
  3. Save the .fp file as example.fp and select File»Close in the Help Editor.
  4. With the selection still on the Volts/Div control, select Edit»Copy Controls.
  5. Select Edit»Paste.
  6. With the selection on the new control, select Edit»Edit Control.
  7. Change the ring Control Label to Volts/Div 2 and the Parameter Position to 2.

Notice in the generated code window that the config function now has an additional parameter, Volts/Div 2.

Complete the following steps to create a new function panel and copy a control to the panel.

  1. Select Option»Edit Function Tree.
  2. Create a function panel window with the following parameters. Type New Panel in the Name box and new_panel in the Function Name box.
  3. Highlight the Configure node in the Function Tree Editor.
  4. Select Edit»Edit Function Panel Window to return to the Configure panel.
  5. Position the selection on the control Volts/Div 2.
  6. Select Edit»Cut Controls.
  7. Press <Ctrl-Page Down> to move to the New Panel function panel.
  8. Select Edit»Paste.

The control appears on the panel. View the help by selecting Edit»Control Help. Notice that the help is copied with the control.