Entering content frame

Background documentation Legend Locate the document in its SAP Library 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 a 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:

·        For the LegendItem, the property semantics

·        For the DateNavigatorMarking, the property daySemantics

 

Example of the Display

This graphic is explained in the accompanying text

 

Runtime Class

CL_WD_LEGEND

 

Properties in the View Designer

Name

Type

Initial Value

Bindable

ID

STRING

(automatic)

No

colCount

I

1

Yes

enabled

WDY_BOOLEAN

true

Yes

tooltip

Text

 

Yes

visible

WDUI_VISIBILITY

visible

Yes

width

STRING

 

Yes

 

Aggregations in the View Designer

Name

Cardinality

Type

ITEMS

0..n

LegendItem

Note

Further properties that can be inherited are defined in the associated higher-level class.  The associated interface elements are:

·   UIElement

·   ViewElement

 

Dynamic Programming

For dynamic programming the same properties, events, and aggregations are provided in the View Designer. Bear in mind the different spellings.

Dynamic Programming of Properties

View Designer Name

Runtime Name

Type

colCount

COL_COUNT

I

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

 

 

 

Leaving content frame