Menu Objects

Uniface enables you to define menu bar, drop-down menu, and pop-up menu objects for use in Windows applications.

Each type of menu contains menu items, which reference another menu or perform an action. Menu items can have icons preceding the menu text, and keyboard shortcuts for fast access.

Menu Bar

Menu bar—horizontal menu beneath the title bar. A menu bar is the highest-level menu object and can be associated with an application shell or a form. Each item in the menu bar references a drop-down menu.

Menu Bar

menu bar

Drop-Down Menu

Drop-down menu—vertical menu that contains menu options or references to other menus. It can be referenced by menu items in a menu bar or in another menu.

Drop-Down Menu

Drop-down menu

Pop-up Menu

Pop-up menu—vertical menu that is displayed when the user right-clicks on the associated object (start-up shell, form, entity, or field). It contains menu options or references to other menus.

Pop-up Menu

pop-up menu

Menu Location

In Uniface, the menu bar is normally shown below the title bar of the application window. This is the default location for a menu bar specified in the startup shell.

When a form that specifies a different menu bar is active, the application shell's menu bar is replaced by the form's menu bar. However, if the form is displayed in a secondary window, the menu bar is shown below the title bar of the form.

Secondary Form with Menu

Secondary form has its own menu

Features of Menu Objects

  • Multilingual—you can define sets of menus in different languages. To switch to a different language, set the $language variable to the desired language.

  • Variations—you create different variations of the same menu, for example, for different customers. To switch to a different variation, set $variation variable.

  • Keyboard-enabled—menu items can selected by pressing the underlined character of the item text. By default, the key letter is automatically determined but you can override this in the menu item definition. You can also define a shortcut key in the menu item definition. For example, in a configuration file, you can map a logical definition such as FileOpen to the actual key combination Ctrl+O. This allows different users to use different shortcut keys.

  • Hint text—you can define hint texts for menu items. These are shown in the message line of the application window when the user hovers over the item.

  • Boolean item status—menu items can be dynamically shown and hidden, enabled and disabled, checked and unchecked.

  • Dynamic content—drop-down and pop-up menus can have dynamic content. Using ProcScript you can update these menus at run time. For example you can add menu items for recently accessed files or currently open windows. You can also create pop-up menus dynamically based on the current context. For example, you might need a field level pop-up menu where the content is related to the field value.

  • Flexible appearance—menu properties enable you to control the appearance of menus using the font, colors, and images. The definitions are stored in a configuration file so the appearance can be altered without programming. This is only available for Windows applications.

  • Easy to maintain—by defining one application menu bar as the default, and creating additional menu bars only for forms that need them, you limit the number of objects to maintain.

    In drop-down and pop-up menus, you can reuse other menus. They can be included in the main list of menu items or as a cascading menu that folds out. This limits the number of objects to maintain even further.

Related Topics