@ ... PROMPT Command
|Visual FoxPro 9.0 SP2|
|@ ... PROMPT Command|
This command is undocumented in the original VFP9 help file,
but the following documentation was found in the FoxPro for Windows 2.6 help, and may still be valid:
Creates a menu bar.
@ row, column PROMPT expC1 [MESSAGE expC2]
The row, column coordinates specify where the menu bar pads are placed. If row is the same for each @ ... PROMPT, a horizontal menu bar is created. If column is the same for each @ ...PROMPT command, a vertical menu bar is created.
The character expression expC1 is the prompt that appears in the menu bar pad.
The character expression expC2 appears when the menu bar is activated with MENU TO.
@ ... PROMPT is included for backward compatibility. Use the Menu Builder to create menus and menu popups.
Using a series of @ ... PROMPTs you can create the menu bar pads and specify their positions in the main FoxPro window or in a user-defined window.
After the menu bar pads are created, issue MENU TO to activate the menu bar.
When you choose a menu bar pad, a number is returned to a memory variable or array element specified in MENU TO. The number returned is determined by the order in which the pads are defined. For example, if five pads are defined with five @ ... PROMPTs and you choose the third pad, 3 is stored to the memory variable or array element.
To choose a menu bar pad, press Enter or the Spacebar when the desired pad is selected, or click the pad.
A menu pad is disabled by placing a backslash (\) before the pad prompt. A disabled menu pad appears on the menu bar but cannot be selected. You can also create a hot key for a menu pad by placing a backslash and a less-than sign (\<) before the character in the prompt that you would like to be the hot key.
If a prompt contains more than one occurrence of a character, the first occurrence of that character is the hot key. In the following example, the second D in ADD is specified as the hot key, but the first D is the hot key.
@ 1,20 PROMPT 'AD\<D' MESSAGE 'Add a record'
If SET CONFIRM is ON, you can select a menu bar pad by pressing the key corresponding to the first character of the prompt. Once a menu bar pad is selected, press Enter or the Spacebar to choose the pad. If hot keys have been assigned to the pads, you can choose a pad by pressing its hot key. Hot keys aren't affected by SET CONFIRM.
If SET CONFIRM is OFF, pressing the key corresponding to the first character of the prompt of a menu bar pad chooses the pad. If menu bar pads have been defined with hot keys other than the first character of the menu bar pads, the hot keys take precedence.
SET TALK OFF CLEAR SET MESSAGE TO 24 CENTER @ 1,20 PROMPT '\
Comment or report problem with topic