[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+---------------+##########################################################
#+-| SELECT_PROMPT |------------------------------+###########################
#| +---------------+ Allows a program to move the |###########################
#| current prompt highlight pad |###########################
#+------------------------------------------------+###########################
##############################################################################
##############################################################################
#+--| Summary |------------+##################################################
#| #INCLUDE io.hdr |##################################################
#+-------------------------+##################################################
##############################################################################
##############################################################################
#+--| Syntax |-----------------------------------------------+################
#| PROCEDURE select_prompt PROTOTYPE |################
#| PARAMETERS VALUE UINT menu_id, VALUE UINT letter |################
#+-----------------------------------------------------------+################
##############################################################################
##############################################################################
#####+---| Description |------------------------------------------------+#####
#####| The select_prompt procedure allows a program to move the current |#####
#####| prompt highlight pad represented by menu_id to the menu prompt |#####
#####| whose first letter matches letter. NOTE: The letter parameter |#####
#####| expects the ASCII value of the first letter of the prompt. |#####
#####| ---------------------------------------------------------------- |#####
#####| Use select_prompt to "force" a menu selection or to program |#####
#####| accelerator keys when using MENU TO RETURN. |#####
#####+------------------------------------------------------------------+#####
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * When using MENU TO abc RETURN, you can program |#########
#########| * menus where the user is to press the uppercase |#########
#########| * letter, not necessarily the 1st letter in the |#########
#########| * prompt. For example, if the menu is: |#########
#########| * "Edit Change eXit" |#########
#########| * you can use the select_prompt to program the |#########
#########| * "ECX" keys. |#########
#########| |#########
#########| MENU TO menu_id RETURN |#########
#########| k = lastkey() |#########
#########| IF chr( k ) $ "EeCcXx" |#########
#########| select_prompt( menu_id, k ) |#########
#########| k = &K_RETURN |#########
#########| ENDIF |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * If user presses a number key, select a prompt. |#########
#########| |#########
#########| DO install_prompt |#########
#########| ! 24,0 SAY "Select item or press 0...10" |#########
#########| MENU TO dual RETURN |#########
#########| |#########
#########| k = lastkey() |#########
#########| IF asc( k-'0' ) =< 10 |#########
#########| select_prompt( dual, 'N' ) |#########
#########| ENDIF |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
@
PROMPT
MENU TO
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson