on 03-15-2017 9:34 AM
Need to display ++ as superscript for a label in SAP UI5. My initial approach was to extend the standard label control and have the property text as sap.ui.core.HTML type, but couldn't go forward. Need suggestions and if possible code example to do so.`
Im using n XML view for display.
<code>sap.m.Label.extend("mylabel.Label", {
// the control API:
library : "sap.m",
metadata: {
aggregations: {
superScript: 'sap.ui.core.HTML'
},
properties: {
text: {
type: "sap.ui.core.HTML"
}
}
},
renderer: function(oRM, oControl) { // static function
sap.m.LabelRenderer.render(oRM, oControl);
}
});
use HTML tags inside XML view...
<core:HTML content="<p>This text contains <sup>superscript</sup> text.</p>" />
output will be
This text contains superscript text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.