cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

How to set coloured text from Data Utility?

TDT
14-Alexandrite
14-Alexandrite

How to set coloured text from Data Utility?

Is there any method available to set the coloured text from Data Utility?

ACCEPTED SOLUTION

Accepted Solutions
HelesicPetr
22-Sapphire I
(To:TDT)

Hi @TDT 

yes you can. 

The method is to define your own CSS style then add a style to the AbstractGuiComponent

 

for example add own CSS style with your color to a  xtheme-windchill.css

name MYCOLOR

.MYCOLOR {
color: red;
font-weight: bold;
}

and you set a style by .addStyleClass method in the DataUtility.

guiComponent.addStyleClass("MYCOLOR");

PetrH

View solution in original post

2 REPLIES 2
HelesicPetr
22-Sapphire I
(To:TDT)

Hi @TDT 

yes you can. 

The method is to define your own CSS style then add a style to the AbstractGuiComponent

 

for example add own CSS style with your color to a  xtheme-windchill.css

name MYCOLOR

.MYCOLOR {
color: red;
font-weight: bold;
}

and you set a style by .addStyleClass method in the DataUtility.

guiComponent.addStyleClass("MYCOLOR");

PetrH

ANNA_02
14-Alexandrite
(To:TDT)

This article has a similar use-case, refer - https://www.ptc.com/en/support/article/CS354557

Announcements

Top Tags