Skip to main content
19-Tanzanite
December 28, 2021
Question

How to dynamically change font size of text box

  • December 28, 2021
  • 2 replies
  • 4032 views

Hi,

 

I'm trying to change the font size of the text box label using custom CSS. So whenever a user enters something into the text box, the custom CSS class will be changed using the expression function. 

 

Velkumar_0-1640675211373.png

 

This is for one text box widget. If I want to use more than 20 text boxes, I need to create 20 expressions to validate/change the custom CSS class. 

 

Is there some efficient way to achieve this requirement instead of creating multiple expression functions 

 

Regards,
VR

 

2 replies

22-Sapphire I
January 3, 2022

You can assign a 'custom class' to the text boxes and then create CSS for that one 'custom class'.

Better yet, create custom classes for any widget types that need this behavior and put your CSS in a Master so it 'trickles' down into all your mashups.

Velkumar19-TanzaniteAuthor
19-Tanzanite
January 4, 2022

Hi @PaiChung 

 

Sorry I didn't get it properly. Could you please give some example 

 

/VR

22-Sapphire I
January 4, 2022

https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/Mashup_Builder/Mashups/MashupCustomClassProperty.html#

 

You can also do searches from support.ptc.com to perhaps find additional examples and directions.

Community Manager
January 12, 2022

Hi @Velkumar.

 

You could possibly use the Grid Advanced widget which has state-based formatting.  Under 9.3, it's just called Grid.

 

Regards.

 

--Sharon