Returns the menu title for a given position on the menu bar.
GETPAD(cMenuBarName, nMenuBarPosition) |
Parameters
- cMenuBarName
- Specifies the menu bar name.
- nMenuBarPosition
- Specifies a position on the menu bar. nMenuPosition can range from 1 (the leftmost menu title on the menu bar) through the number of menu titles on the menu bar.
Return Value
Character
Remarks
Menu names on a titles bar can be added, removed, or rearranged. Use DEFINE PAD to add a menu name to a title bar or RELEASE PAD to remove a menu title.
Example
The following program uses GETPAD(В ) to test if the Edit menu name is on the Visual FoxPro system menu bar. If it is, GETPAD(В ) returns the menu name. (To restore the Edit menu bar to its default state, issue the command SET SYSMENU TO DEFAULT.)
В | Copy Code |
---|---|
FOR gnCount = 1 TO CNTPAD('_msysmenu') && Number of pads IF PRMPAD('_msysmenu', GETPAD('_msysmenu', gnCount)) = 'Edit' RELEASE PAD (GETPAD('_msysmenu', gnCount)) OF _msysmenu EXIT ENDIF ENDFOR |