PopUpMenu in control panels

I'm trying to create a control panel with a popupmenu.

Is there an easy way to read the user selected value whenever a change has occured?
Certainly!

Double-click the popup control while in ShowTools mode (Ctrl+T) and click the "New" button in the Procedure row, then enter the desired code.

For example:

Function PopMenuProc(ctrlName,popNum,popStr) : PopupMenuControl
    String ctrlName
    Variable popNum
    String popStr

    Print "The user selected "+popStr
End


Then click the "Save Procedure Now" button and then "Do It" in the PopupMenu Control dialog.

Software Engineer, WaveMetrics, Inc.