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
|
Back to Table of Contents
Copyright © 2002-2018 by Tamar E. Granor,
Ted Roche, Doug Hennig, and Della Martin. Click for license
.