MenuBar

A MenuBar is used to display actions in a structure. The MenuBar is a toolbar that can be organized in different blocks, the Menus. Under each block, you can organize individual menu items or other menus.

Example of the Visual Display

Runtime Class

CL_WD_MENU_BAR

Properties in View Designer

Name Type Initial Value Bindable

id

STRING

(automatic)

No

contextMenuBehaviour

WDUI_CONTEXT_MENU_BEHAVIOUR

inherit

No

contextMenuId

WDY_MD_UI_ELEMENT_REFERENCE

No

design

WDUI_MENU_BAR_DESIGN

standard

Yes

enabled

WDY_BOOLEAN

true

Yes

styleClassName STRING Yes

tooltip

Translatable text

Yes

visible

WDUI_VISIBILITY

visible

Yes

width

STRING

Yes

Aggregations in the View Designer

Name Cardinality Type

Menu

0..n

Menu

Dynamic Programming

For dynamic programming, the same properties, events and aggregations are available as in the View Designer. But note that the spelling format and use of upper/lower case is different.

Dynamic Programming of Properties

View Designer Name Runtime Name Type

contextMenuBehaviour

CONTEXT_MENU_BEHAVIOUR

WDUI_CONTEXT_MENU_BEHAVIOUR

 contextMenuBehaviour: inherit

CL_WD_MENU_BAR=>E_CONTEXT_MENU_BEHAVIOUR-INHERIT

 contextMenuBehaviour: provide

CL_WD_MENU_BAR=>E_CONTEXT_MENU_BEHAVIOUR-PROVIDE

 contextMenuBehaviour: suppress

CL_WD_MENU_BAR=>E_CONTEXT_MENU_BEHAVIOUR-SUPPRESS

contextMenuId

CONTEXT_MENU_ID

WDY_MD_UI_ELEMENT_REFERENCE

design

DESIGN

WDUI_MENU_BAR_DESIGN

design: standard

CL_WD_MENU_BAR=>E_DESIGN-STANDARD

design: transparent

CL_WD_MENU_BAR=>E_DESIGN-TRANSPARENT

enabled

ENABLED

WDY_BOOLEAN

styleClassName STYLE_CLASS_NAME STRING

tooltip

TOOLTIP

WDY_MD_TRANSLATABLE_TEXT

visible

VISIBLE

WDUI_VISIBILITY

visible: none

CL_WD_MENU_BAR=>E_VISIBLE-NONE

visible: visible

CL_WD_MENU_BAR=>E_VISIBLE-VISIBLE

width

WIDTH

STRING

Dynamic Programming of Aggregations

View Designer Name Runtime Name Cardinality

Menu

MENUS

0..n

Example

There is a system example for this UI element in the DEMO_UIEL_MENU component in the DEMO_UIEL_MENUBAR application.