A fourth dialog procedure is the STRMENU procedure. A STRMENU procedure call also causes processing to pause while the user responds to the dialog. The advantage of the STRMENU procedure is its ability to provide several choices, rather than just two (Yes or No). A common use is to provide an option menu in response to the user pressing a command button.
STRMENU has the following syntax:
IntegerValue := STRMENU(StringVariable of Options separated by commas [, OptionDefault][, Instruction])
IntegerValue will contain the user's selection entry, and OptionDefault is an integer representing which option will be selected by default when the menu displays. If we do not provide an OptionDefault value, the first option that's listed will be used as the default. Instruction is a text string that will display the preceding list of options. If the user responds with Cancel or presses the Esc key, the value that's returned by the procedure is 0.
Use...