Condividi tramite


PRMPAD( ) Function

Returns the text of a menu title.

PRMPAD(MenuBarName, MenuTitleName)

Return Values

Character

Parameters

  • MenuBarName
    Specifies the name of the menu bar containing the menu title.
  • MenuTitleName
    Specifies the menu title.

Remarks

Menu bars are created with DEFINE MENU, which creates the menu bar, and DEFINE PAD, which creates the menu titles in the menu bar. PRMPAD( ) also works with the Visual FoxPro menu system. A menu bar doesn't have to be active for PRMPAD( ) to return the text for a menu title.

If a menu title was created using the backslash and less-than characters (\<) to create an access key, or a backslash (\) to disable the menu title, PRMPAD( ) returns only the text of the menu title; it doesn't include the special characters.

Example

In the following example, a menu bar named mnuExample is created with three menu titles. The access key and disabled option designators aren't returned from the menu titles named titleTwo and titleThree. The menu bar is activated to show the menu titles and is cleared from the screen and from memory when a menu title is chosen.

CLEAR
SET TALK OFF
STORE 'mnuExample' TO gcPopName

DEFINE MENU mnuExample BAR AT LINE 1
DEFINE PAD titleOne OF mnuExample PROMPT 'This will be returned'
DEFINE PAD titleTwo OF mnuExample PROMPT '\<As will this'
DEFINE PAD titleThree OF mnuExample PROMPT '\And this, too'

=messagebox( PRMPAD('mnuExample', 'titleOne') )
=messagebox( PRMPAD('mnuExample', 'titleTwo') )
=messagebox( PRMPAD(gcPopName, 'titleThree') )

ACTIVATE MENU mnuExample
DEACTIVATE MENU mnuExample
RELEASE MENU mnuExample

See Also

CNTBAR( ) | GETBAR( ) | DEFINE BAR | DEFINE POPUP | MRKPAD( ) | PRMBAR( )