Set Mark Of, MrkBar(), MrkPad()

The SET MARK OF command (not to be confused with SET MARK TO) lets you put a checkmark next to a menu bar or pad. The two functions ask whether an item is marked.

Usage

SET MARK OF MENU MenuName [ TO ] cMark | lMarkIt
SET MARK OF PAD PadName OF MenuName [ TO ] cMark | lMarkIt
SET MARK OF POPUP PopupName [ TO ] cMark | lMarkIt
SET MARK OF BAR nBar OF PopupName [ TO ] cMark | lMarkIt
SET MARK OF can be divided up two different ways. First, there are two kinds of values you can hand it: character and logical. In Visual FoxPro, the character values are ignored. (In FoxPro 2.x, they let you specify the mark character.)The logical value determines whether the specified item has a checkmark character (like, for example, the item for the active window in Visual FoxPro's Window menu). When lMarkIt evaluates to .T., the item is checked.However, like other menu commands, the MENU and POPUP versions of SET MARK propagate downward. If you SET MARK OF a popup to .T., all the bars on that popup get marked unless you issue a separate SET MARK OF BAR command to turn off particular bars. Similarly, SETting MARK OF a menu to .T. marks all the pads.

You can mark system menu items, either at the popup or the bar level. The secret is to use their built-in names. For example, to mark all the bars of the Edit menu, you'd use SET MARK OF POPUP _MEdit .T. To mark individual bars, you have to use their bar numbers. For example, use SET MARK OF BAR _med_undo .T. to mark the Edit-Undo menu bar. Of course, we have no idea why you'd ever want to mark system menu bars.


Incidentally, although Microsoft has chosen not to document it anymore, there is a SET MARK OF PAD command, and it does work for menu pads you define yourself.

Example

SET MARK OF BAR 3 OF MyPopup TO .T.

Usage

lIsMarked = MRKBAR( cPopupName, nBar | SystemBarName )
lIsMarked = MRKPAD( cMenuName, cPadName)
MRKBAR() and MRKPAD() report whether the specified bar or pad has been marked. For system menu bars, you have to use the bar name, not in quotes. (Actually, that bar name is a number, a very negative number.)

Example

* See GETBAR()

See Also

Define Bar, Define Menu, Define Pad, Define Popup, GetBar(), GetPad(), Menus


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .