Context Menus

Context Menus and Menu Buttons

Context menus are shortcuts to often used functions.

 Figure 1: The diagram shows how context menus fit into the general framework of accessing functionality.

Recommendations for the Use of Context Menus

Structure

In principle context menus are structured like usual dropdown menus. They may contain the following elements:

  • Menu entries (text),
  • Icons (in front of the text),
  • Ellipses (following the text, indicate that a dialogue box is called),
  • Arrows (following the text; indicate that the menu contains a further menu level which is displayed as a cascading menu),
  • Keyboard shortcuts (for example Ctrl-F2; follows the text),
  • Separator lines for clustering the menu items into useful groups.

These elements can be combined according to the requirements of the control or application which supplies the context menu. The next two figures show examples for possible context menus.

Figure 2: Examples for context menus

If there exits a default action for a context menu, this action appears as the first entry of the menu item list.

Context menus must not contain functions which are not also presented in other system locations. That is, a function must not appear in a context menu only.

Submenus

Context menus may contain submenus, but only one more level. Hierarchies with more than two levels are not allowed.

Number of Items

A context menu should not contain more than 10 items.

Completeness

A context menu should contain the complete set of pushbuttons that exists for a given object (e.g. tables / ALV lists).

"Default" Menu

On the screen background or on other undefined screen areas, the context menu only displays the item "No entry".

This way users receive feedback saying that there exists a context menu functionality, but that at this location no sensible actions can be provided.

Default Functions

All text fields (e.g. also table cells) contain at least the items "Cut", "Copy", "Paste" and "Select All".

Keyboard Shortcuts

Context menu items should display mnemonics for keyboard shortcuts, e.g. Ctrl-V.

For improving keyboard accessibility, all menu items should also have a "hot key" (accelerator key) assigned to them, that is, a letter key that directly calls a function. Accelerator keys are underlined; they must be unique for a given context menu.

Sequence

Functions specific for the object where the right mouse button was pressed have to be located at the beginning of the menu item list. Then transfer functions (Cut, Copy, Paste) and - if supplied - additional functions follow.

Inheritance

Menu items are only inherited, if a single element (e.g. a checkbox) does not have a context menu of its own. In such a case, for example, the surrounding group box supplies the context menu:

 Figure 3: Context menu supplied by a group box

Functions assigned to the left mouse button (e.g. Select) should not be replicated for the right mouse button. Exception: Select All.

 

 top top

Source:  SAP R/3 Style Guide