Share via


Shortcut Menu Class Foundation Class

When placed on a project or form, this class dynamically creates shortcut popup menus.

Category

Menus

Default Catalog

Visual FoxPro Catalog\Foundation Classes\Menus

Class

_shortcutmenu

Base Class

Custom

Class Library

_menu.vcx

Parent Class

_custom

Sample

...\Samples\Solution\Ffc\newmenu.scx

Remarks

To use, drop the class on a project or form or, from the Component Gallery Item shortcut menu, select Add to Project or Add to Form. When you add the class to a form, Visual FoxPro places the class on the form. You can then specify the appropriate property values and provide any necessary input and output objects. When you drop the class on a project, you can choose between adding the class or creating a subclass.

See Guidelines for Using Visual FoxPro Foundation Classesfor more information on using foundation classes.

Properties, Events, Methods

Description

cOnSelection property

Specifies the menu bar selection routine.

Default: ""

cMenu property

Specifies the name of the shortcut menu.

Default: ""

DeactivateMenu method

Deactivates the existing shortcut menu.

Syntax: DeactivateMenu( )

Return: none

Arguments: none

ActivateMenu method

Activates the existing shortcut menu.

Syntax: ActivateMenu(tcParentMenu)

Return: none

Arguments: tcParentMenu specifies the name of the menu from which the shortcut is activated.

ClearMenu method

Releases the existing shortcut menu.

Syntax: ClearMenu( )

Return: none

Arguments: none

NewMenu method

Creates a new menu popup for the shortcut menu.

Syntax: NewMenu( )

Return: none

Arguments: none

AddMenubar method

Adds a new menu bar to the shortcut menu.

Syntax: AddMember(tcPrompt, tcOnSelection, tcClauses, tnElementNumber, tlMark, tlDisabled, tlBold)

Return: none

Arguments: tcPrompt specifies the item label.tcOnSelection specifies the action performed by selecting the item.tcClauses specifies any command clause for the item.tnElementNumber specifies the location of the element in the array.tlMark specifies whether to use the default mark character.tlDisabled specifies whether the menu item is disabled.tlBold specifies whether the item is bold.

AddMenuSeparator method

Adds a separator to the shortcut menu.

Syntax: AddMenuSeparator(tnElementNumber)

Return: none

Arguments: tnElementNumber specifies the position the separator occupies in the menu.

ShowMenu method

Displays the existing shortcut menu.

Syntax: ShowMenu( )

Return: none

Arguments: none

SetMenu method

Releases the current shortcut menu in order to create a new one.

Syntax: SetMenu(toObject)

Return: none

Arguments: toObject specifies the name of the new shortcut menu.

aMenu[1,0] property

Internal to the class.

See Also

Concepts

Guidelines for Using Visual FoxPro Foundation Classes

Reference

Visual FoxPro Foundation Classes A-Z

Other Resources

Foundation Class Samples