Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

How Do I Use Custom Controls in CVI?

Primary Software: LabWindows/CVI Development Systems>>Base Package
Primary Software Version: 7.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
How do I use custom controls in CVI such as the password control, file browser, and radio buttons?

Solution:
LabWindows/CVI provides additional user interface controls beyond the standard input/output controls. Features such as the Password Control, File Browser, and Radio Button Groups are extensions based upon standard controls. For instance, the Password Control is simply an extension of a string control with some added functionality such as string masking. These modifications are made by creating additional functions to account for the extended behavior. These additional functions, however, are not created by default. Follow these steps in order to use these Custom Controls.

  1. Locate the control that you want to use from the list of controls in the user interface editor and place the control on a panel.

  2. Right-Click on the control and select "Generate Custom Control Code"

  3. Specify the source file (*.c) that should be edited to use the control.

  4. Notice that a new Instrument File (*.fp) appears in the Workspace Window inside of your project and the source code reflects necessary initialization procedures.

  5. Modify the control as necessary using functions within the Instrument File. Most controls have a function in the format "Set Attribute" that allows for modification of the control.
Note: A main function must be present for the code generation utility to correctly insert necessary initialization functions. If you are developing a DLL or have not yet created a main function, create a temporary user interface application to see the generated function calls (In CVI 8.1, simply select File»New»Project from Template and select User Interface Application).

Related Links:

Attachments:


figure1.JPG - figure1.JPGfigure2.JPG - figure2.JPGfigure3.JPG - figure3.JPGfigure4.JPG - figure4.JPG


Report Date: 03/30/2007
Last Updated: 06/25/2007
Document ID: 47TB56GJ

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit