Adding Context Menus

Context menus can be associated with controls on your form. These menus appear when the user right-button clicks on the control.

To add a context menu to a form

  1. On the Toolbox, under the WFC Controls tab, double-click the ContextMenu control.

Note   Any of the methods used to add a control to a form may be used. You can also highlight the ContextMenu control on the Toolbox and, holding down the left mouse button, drag the control onto your form.

The ContextMenu control is inserted onto your form.

  1. To enter design mode, double-click the ContextMenu control.

Context menu controls can be edited in the same way as MainMenu controls.

To assign a context menu to a control

To add access keys to a menu

  1. Click the menu caption in which you want to add an access key.

  2. Place the mouse cursor immediately before the letter in the caption that you want to be your access letter and type an ampersand (&). For example, on the File menu, click File and place the mouse cursor at the beginning of the word. Then type an ampersand before the "F."

    -or-

To enable check marks on a menu

To move a menu

Note   Moving top-level menu captions will move all child members, as well. Child members will not be displayed during the move.

To modify a menu

To create a menu separator bar

  1. Click the menu caption that is above the location where you want to add a separator bar.

  2. Press the Dash (-) key and then press ENTER.

    A separator bar appears directly below your menu caption.

    -or-

Separator bars may be moved and deleted in the same manner as regular menu captions.

To delete a menu item from your form

Note   To delete the entire menu, highlight each menu caption and press DELETE, or click the ContextMenu1 control and use Ctrl+Delete from the context menu.

Confirmation on deletion only occurs on menu captions with sub-menus.