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
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.
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
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 |
---|---|---|---|
STRING |
(automatic) |
No |
|
I |
1 |
Yes |
|
WDUI_CONTEXT_MENU_BEHAVIOUR |
inherit |
No |
|
WDY_MD_UI_ELEMENT_REFERENCE |
No |
||
WDY_BOOLEAN |
true |
Yes |
|
Translatable text |
Yes |
||
WDUI_VISIBILITY |
visible |
Yes |
|
STRING |
Yes |
Aggregations in the View Designer
Name | Cardinality | Type |
---|---|---|
0..n |
Other properties that can be inherited are defined in the related higher-level classes. The related UI elements are:
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 |
---|---|---|
COL_COUNT |
I |
|
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 |
|
CONTEXT_MENU_ID |
WDY_MD_UI_ELEMENT_REFERENCE |
|
ENABLED |
WDY_BOOLEAN |
|
TOOLTIP |
WDY_MD_TRANSLATABLE_TEXT |
|
VISIBLE |
WDUI_VISIBILITY |
|
visible: none |
CL_WD_LEGEND=>E_VISIBLE-NONE |
|
visible: visible |
CL_WD_LEGEND=>E_VISIBLE-VISIBLE |
|
WIDTH |
STRING |
Dynamic Programming of Aggregations
View Designer Name | Runtime Name | Cardinality |
---|---|---|
ITEMS |
0..n |