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.
- 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.
- Right-Click on the control and select "Generate Custom Control Code"
- Specify the source file (*.c) that should be edited to use the control.
- Notice that a new Instrument File (*.fp) appears in the Workspace Window inside of your project and the source code reflects necessary initialization procedures.
- 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
- figure2.JPG
- figure3.JPG
- figure4.JPG
Report Date: 03/30/2007
Last Updated: 06/25/2007
Document ID: 47TB56GJ