Legend
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, DateNavigator, a FormLayoutAdvanced, or a GridLayout.
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.
-
For FormLayoutAdvanced or GridLayout:
In the UIElementContainer with FormLayoutAdvanced or GridLayout insert a Legend element and assign it to this container setting the ID of the Legend element as the legendId of FormLayoutAdvanced or GridLayout.
The color-wise assignment of the LegendItem is done via the enumeration type TableCellDesign. The following properties are of this type:
- For LegendItem the property semantics
- For DateNavigatorMarking the property daySemantics
- For the table, the property cellDesign of the TableColumn
- For FormDataAdvanced or GridLayout property semanticColor
Example of the Visual Display
|
|
| 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 |
|
| styleClassName | STRING | Yes | |
|
Translatable text |
Yes |
||
|
WDUI_VISIBILITY |
visible |
Yes |
|
|
STRING |
Yes |
Aggregations in the View Designer
| Name | Cardinality | Type |
|---|---|---|
|
0..n |
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 |
|---|---|---|
|
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 |
|
| styleClassName | STYLE_CLASS_NAME | STRING |
|
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 |
