
You can add many kinds of controls to Igor Pro®'s control panels or graphs and implement their behavior by writing “control procedures” for them.
The Add/Modify Control dialog makes this relatively simple. Select the graph or panel you want to add the control to, and choose "Add Control" from the Graph or Panel menu:
Set up the control's size and other properties using the dialog:
A skeleton procedure is created for you. Add your custom code in this dialog or afterwards in the procedure window. Here we’ve added only the value set code which re-computes a single-tone audio wave whose frequency is controlled by the slider value as a percentage of the 44100 Hz sampling frequency. The remaining text is the structure-based skeleton code for a slider control.
Click on Save Procedure Now, then click Do It in the main dialog to create the slider control:
Move the slider’s thumb to see how the slider’s procedure changes the data array:
Other standard controls can be added using dialogs:
Once created the controls can be arranged by dragging, by copy-and-paste, or by contextual menus that align, distribute or even retrieve controls that stray beyond the window’s bounds:
So far, if you change the size of the window, the controls stay where they are. It would be convenient if as the window gets wider, the slider got more room and the radio buttons stayed near the right edge. As of Igor 10, that can be easily accomplished using "Guides Mode". Guides are lines that you can position in various ways to move or resize controls. Here we have added guides to the example to allow the slider to get bigger and the radio buttons to stay at the right edge:
We have added three guide lines to the panel, indicated in this editing mode as dashed green lines. the one at the left end is a fixed distance from the left edge of the panel. The two at the right end are a fixed distance from the right edge of the panel. The radio buttons have a left edge attached to one of the guides; that will make them move with the right edge of the panel. The slider is attached at both the left and right edges, making it resize as the window gets wider or narrower:
Help for Controls
You can add contextual help tips to explain the controls to your users by entering Help Text in the control dialogs:
Another way to provide help is to create a Help button that opens an Igor Help File (that you’ve created) using the DisplayHelpTopic
command:

Forum

Support

Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More