BarPrompt(), PrmBar(), PrmPad()
These functions look up the prompt of a particular bar or pad.
Usage |
cPrompt = BARPROMPT( nBar, cPopupName ) cPrompt = PRMBAR( cPopupName, nBar ) cPrompt = PRMPAD( cMenuName, cPadName ) |
Although their parameter lists are reversed, BARPROMPT() and PRMBAR() share the same weird behavior with the built-in system menu bars. Ask for PRMBAR("_MFile", 1) and you get an error message instead of "New...". To get your hands on those prompts, you have to refer to the bars using their names, not their positions. Try PRMBAR("_MFile", _MFi_New) instead. Note that you use the bar name without quotes. In fact, the bar names appear to be defined constants for a bunch of very negative numbers. ? STR(_MFi_New) yields –24064 in VFP 6 and later, and PRMBAR("_MFile", –24064) also returns "New...". |
Example |
? PRMPAD("_MSysMenu", "_MSM_Edit") && Returns "Edit" |
See Also |
Define Bar, Define Pad, GetBar(), GetPad(), Menus, Sys(2013) |