cancel
Showing results for 
Search instead for 
Did you mean: 

How to make particular text bold in composite binding

former_member187227
Participant
0 Kudos

Hello All,

I want to make a particular text as bold in sap.m.text control. Tried with bold() and addStyleClass in formatter.js, but it's not working, Help me with this to resolve.

Accepted Solutions (0)

Answers (3)

Answers (3)

maheshpalavalli
Active Contributor

It's easily possible using the formattedText ui5 control

https://ui5.sap.com/#/entity/sap.m.FormattedText/sample/sap.m.sample.FormattedText

Regards,

Mahesh

former_member709916
Participant
0 Kudos

1. In view.xml file add CSS class property to your text:

<Text text="your text" class="textClass"/>

2. In style.css file add:

.textClass {

text-decoration: bold;

}

FlorianVogt
Advisor
Advisor
0 Kudos

Hi Vinothkumar,

its possible to use the addStyleClass property.
For example: https://jsfiddle.net/flovogt/nojf5wzy/
You have to use CSS class definitions which are more strict than the default one coming from UI5 itself.