Buttons in Dialog Boxes


To place a labeled button into a dialog box, put a b modifier in the braces in the display portion of the menu file.  The text to the left of the braces will appear on the button when the menu is invoked.  The statements to be executed when the button is pressed follow two tildes (~~) on the same line.  For example:


// button.pan



Button Example


Generate Noise <b>~~w0 := gnorm(1000, 0.001)

Generate Sin   <b>~~w0 := gsin(1000, 0.001)





Because buttons always execute immediately when pressed, the evaluation area of a button field is blank. In this example, the GNORM or GSIN function executes depending on which button is pressed.