Show TOC

ToolBarLocate this document in the navigation structure

Use

A Toolbar UI element is a collection of tools that can be accessed using UI elements. Therefore, toolbars provide an additional way of grouping UI elements by function.

A ToolBar can contain the following elements:

Each individual element has the collapsible property, with which it can be hidden. All elements that can be collapsed together can be hidden in a small triangular symbol.

These toolbar elements are horizontally arranged in one row of the toolbar. The size and position of the individual UI elements are automatically calculated. You can use the wrapping property to determine whether a line break can be applied to the elements in a row.

ITo find out how to download a file without using the UI element see File Export.

Note

To enable the development of accessible applications, the accessibilityDescription and tooltip properties are not checked during the syntax check.

A tooltip does not necessarily have to be set for this UI element, but it could make sense to set it if it contains detailed semantic information.

Runtime Class

CL_WD_TOOLBAR

Properties in View Designer

Name

Type

Initial Value

Bindable

id

STRING

(automatic)

No

accessibilityDescription

Translatable text

Yes

contextMenuBehaviour

WDUI_CONTEXT_MENU_BEHAVIOUR

inherit

No

contextMenuId

WDY_MD_UI_ELEMENT_REFERENCE

No

design

WDUI_TOOLBAR_DESIGN

standard

Yes

enabled

WDY_BOOLEAN

true

Yes

itemOverflow

WDUI_ITEM_OVERFLOW

Wrap Items

Yes

styleClassName STRING Yes

tooltip

Translatable text

Yes

visible

WDUI_VISIBILITY

visible

Yes

wrapping

WDY_BOOLEAN

true

Yes

Aggregations in the View Designer

Name

Cardinality

Type

Toolbar UI Element

0..n

ToolBarItem

Toolbar Popin

0..1

Popin

Right-Aligned Toolbar Element

0..n

ToolBarItem

Note

Other properties that can be inherited are defined in the related higher-level classes. The related UI elements are:

Dynamic Programming

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

Dynamic Programming of Properties

View Designer Name

Runtime Name

Type

accessibilityDescription

ACCESSIBILITY_DESCR

WDY_MD_TRANSLATABLE_TEXT

contextMenuBehaviour

CONTEXT_MENU_BEHAVIOUR

WDUI_CONTEXT_MENU_BEHAVIOUR

 contextMenuBehaviour: inherit

CL_WD_TOOLBAR=>E_CONTEXT_MENU_BEHAVIOUR-INHERIT

 contextMenuBehaviour: provide

CL_WD_TOOLBAR=>E_CONTEXT_MENU_BEHAVIOUR-PROVIDE

 contextMenuBehaviour: suppress

CL_WD_TOOLBAR=>E_CONTEXT_MENU_BEHAVIOUR-SUPPRESS

contextMenuId

CONTEXT_MENU_ID

WDY_MD_UI_ELEMENT_REFERENCE

design

DESIGN

WDUI_TOOLBAR_DESIGN

design: emphasized

CL_WD_TOOLBAR=>E_DESIGN-EMPHASIZED

design: standard

CL_WD_TOOLBAR=>E_DESIGN-STANDARD

design: transparent

CL_WD_TOOLBAR=>E_DESIGN-TRANSPARENT

enabled

ENABLED

WDY_BOOLEAN

itemOverflow

ITEM_OVERFLOW

WDUI_ITEM_OVERFLOW

styleClassName STYLE_CLASS_NAME STRING

tooltip

TOOLTIP

WDY_MD_TRANSLATABLE_TEXT

visible

VISIBLE

WDUI_VISIBILITY

visible: none

CL_WD_TOOLBAR=>E_VISIBLE-NONE

visible: visible

CL_WD_TOOLBAR=>E_VISIBLE-VISIBLE

wrapping

WRAPPING

WDY_BOOLEAN

Dynamic Programming of Aggregations

View Designer Name

Runtime Name

Cardinality

Toolbar UI Element

TOOLBAR_ITEMS

0..n

Toolbar Popin

TOOLBAR_POPIN

0..1

Right-Aligned Toolbar Element

TOOLBAR_RIGHT_ITEMS

0..n

Example

You can find examples in the system in the Web Dynpro application, WDR_TEST_UI_ELEMENTS.