ActivateCell

BarCount(), CntBar(), CntPad()

These functions tell you how many bars are on a popup or how many pads are on a menu.

Usage

nBars = BarCount( [ cPopupName ] ) nBars = CntBar( [ cPopupName ] ) nPads = CntPad( cMenuName )
These functions expect a character string. Don't forget the quotes around the name of the item. BARCOUNT() and CNTBAR() do the same thing—BARCOUNT() is one of the functions added in FoxPro 2.6 for dBase compatibility. When you omit the popup name, they both return information about the active popup. We had trouble getting that value to show up in the Debugger—if we put CNTBAR() in the Watch window, then activated a popup, the value wasn't updated until we chose one of the items in the popup.

See Menus for an explanation of the different components of a menu.

Example

? BarCount("_MFILE")  && Returns 23 in VFP 6 ? CntPad("_MSYSMENU") && Returns 8 with default setup

See Also

Define Bar, Define Pad, Menus


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