Show TOC

LegendLocate this document in the navigation structure

The Legend UI element allows you to display a descriptive text for different colors used in an assigned UI element. The Legend element can be positioned anywhere in the view and be assigned to a Table or a DateNavigator.

Assigning the Legend element

  • To the DateNavigator element:

    In the view, after the DateNavigator element insert a Legend element and assign it to the DateNavigator element by setting the ID of the Legend element as the legendID property of the DateNavigator element.

  • To the table:

    You can insert a Legend element after the table and use the legendID property to assign it to the table. To position the Legend element at the bottom of the table, you can use the LegendPopin. Insert a LegendPopin into the table and content into the LegendPopin. Then insert a Legend element into the content.

The color-wise assignment of the LegendItem is done via the enumeration type TableCellDesign. The following properties are of this type:

Example of the Visual Display

LEGEND

Note

To enable the development of accessible applications, the syntax check verifies whether the legendID property of the legend element (Calendar, DateNavigator, Table) has been set.

Runtime Class

CL_WD_LEGEND

Properties in View Designer

Name Type Initial Value Bindable

id

STRING

(automatic)

No

colCount

I

1

Yes

contextMenuBehaviour

WDUI_CONTEXT_MENU_BEHAVIOUR

inherit

No

contextMenuId

WDY_MD_UI_ELEMENT_REFERENCE

No

enabled

WDY_BOOLEAN

true

Yes

tooltip

Translatable text

Yes

visible

WDUI_VISIBILITY

visible

Yes

width

STRING

Yes

Aggregations in the View Designer

Name Cardinality Type

ITEMS

0..n

LegendItem

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

colCount

COL_COUNT

I

contextMenuBehaviour

CONTEXT_MENU_BEHAVIOUR

WDUI_CONTEXT_MENU_BEHAVIOUR

 contextMenuBehaviour: inherit

CL_WD_LEGEND=>E_CONTEXT_MENU_BEHAVIOUR-INHERIT

 contextMenuBehaviour: provide

CL_WD_LEGEND=>E_CONTEXT_MENU_BEHAVIOUR-PROVIDE

 contextMenuBehaviour: suppress

CL_WD_LEGEND=>E_CONTEXT_MENU_BEHAVIOUR-SUPPRESS

contextMenuId

CONTEXT_MENU_ID

WDY_MD_UI_ELEMENT_REFERENCE

enabled

ENABLED

WDY_BOOLEAN

tooltip

TOOLTIP

WDY_MD_TRANSLATABLE_TEXT

visible

VISIBLE

WDUI_VISIBILITY

visible: none

CL_WD_LEGEND=>E_VISIBLE-NONE

visible: visible

CL_WD_LEGEND=>E_VISIBLE-VISIBLE

width

WIDTH

STRING

Dynamic Programming of Aggregations

View Designer Name Runtime Name Cardinality

ITEMS

ITEMS

0..n