ActiveColumn

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 )
Like the bar and pad-counting functions, these expect character strings for the names of menu components.

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...".


This behavior means that to build a list of bars in a system popup, you need to first use GETBAR() to find the actual bar numbers, then use PRMBAR() to look up the prompts.

Example

? PRMPAD("_MSysMenu", "_MSM_Edit")  && Returns "Edit"

See Also

Define Bar, Define Pad, GetBar(), GetPad(), Menus, Sys(2013)


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net