1

I am new to SAPUI5 and would like to change the text color of a label to red. How can I do this?

I tried:

sap.ui.getCore().byId("lableID").setStyleClass("red");

but the color does not change.

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
muller99
  • 21
  • 4

1 Answers1

2

You need to add a style.css file under webapp > css to your project. The style.css file could look like this:

.red {
    color: red;
}
Nico S.
  • 116
  • 6