Menu Bar

A menu bar is the area of a window immediately beneath the title bar that contains menu items such as File, Edit, Window, and Help. Active Accessibility also creates a menu bar object for a system menu, which is the menu in the top left corner of the title bar and contains menu items such as Restore, Move, Size, Minimize, and Maximize.

Note  Since menu bar controls do not receive focus, accSelect and get_accFocus methods are not supported for this control.

Supported Properties and Methods

  • accHitTest
    accLocation
    accNavigate
    accSelect
    get_accChild
    Retrieves the IDispatch interface for the specified menu item. The child IDs for the menu items are numbered sequentially from left to right starting with one.

  • get_accChildCount
    The ChildCount property is the number of menu items on the menu bar. The ChildCount property for a system menu is one.

  • get_accDescription
    The Description property for a menu bar is "Contains commands to manipulate the current view or document". The Description property for a system menu is "Contains commands to manipulate the window".

  • get_accDefaultAction
    get_accFocus
    get_accHelp
    get_accHelpTopic
    get_accKeyboardShortcut
    The KeyboardShortcut property for a menu bar beneath the title bar is "Alt". The KeyboardShortcut property for a system menu is "Alt+Space".

  • get_accName
    The Name property for a menu bar beneath the title bar is "Application". The Name property for a system menu is "System".

  • get_accParent
    get_accRole
    The Role property is ROLE_SYSTEM_MENUBAR.

  • get_accState
    The State property is a combination of one or more of the following values:

    STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_FOCUSED | STATE_SYSTEM_FOCUSABLE

Events Generated

EVENT_SYSTEM_MENUSTART

EVENT_SYSTEM_MENUEND

EVENT_SYSTEM_MENUPOPUPSTART

EVENT_SYSTEM_MENUPOPUPEND

EVENT_OBJECT_FOCUS

Remarks

The system triggers more than one EVENT_SYSTEM_MENUSTART event that does not always have a corresponding EVENT_SYSTEM_MENUEND event. Additionally, the system does not trigger the EVENT_SYSTEM_MENUPOPUPSTART and EVENT_SYSTEM_MENUPOPUPEND events consistently. This is a known issue and is being addressed.

See Also

IAccessible Interface Menu Item, Pop-up Menu