LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Function Panel with File Select Dialog

Hello,
 
how can I create a new function panel with a file select dialog button right beside the input control.
Enclosed you will find a screenshot of the CVI function "LoadPanel" that has such a button.
 
How can I include this button into my custom function panel?
 
0 Kudos
Message 1 of 2
(2,981 Views)
Hello,

To create function panel customizations, first you have to create a DLL that exports a function that will perform the customization. In the LoadPanel function panel that you noticed, this function reads the current control value, launches the file dialog, then sets the value back to the control that the user selected.

Once you have the DLL, open your function panel file in edit mode, then select Tools>>Customize Function Panels. You'll be presented with a dialog in which you can select the parameter and the function(s) that you want to customize. Then you just have to associate this parameter with your function and DLL. The output of this operation is another file, an .fpc file, that contains the mappings from parameters to DLL functions. This .fpc file (and the DLL) always needs to accompany the .fp file.

You should read the following help topic:

Using LabWindows/CVI>>Using Function Panels>>Customizing Function Panels

You should also check out the following example program:

samples>>functionpanels>>Customization>>SelectColor.cws.

Examining this example program will allow you to know how to get and set the values from the function panel controls. (you'll need to use the fpcustom.fp interface to do this). It shouldn't be difficult, though.

Luis
Message 2 of 2
(2,963 Views)