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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

How to set coloured text from Data Utility?

TDT
12-Amethyst
12-Amethyst

How to set coloured text from Data Utility?

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

1 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
13-Aquamarine
(To:TDT)

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

Top Tags