Change colour of TextBox Web Component text on data change

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Change colour of TextBox Web Component text on data change

Postby roddy » Thu Nov 11, 2021 5:29 am

I am unable to find a way to change the colour of the text in a TextBox web component depending on data. There is a style class but not style class data provider. It needs to be an editable field, so I wouldn't be able to load it up with HTML tags. I feel I'm just missing something simple here...
roddy
 
Posts: 100
Joined: Mon Oct 26, 2020 12:32 am

Re: Change colour of TextBox Web Component text on data chan

Postby ptalbot » Fri Nov 12, 2021 12:32 am

Have a look at elements.yourElementName .addStyleClass()/.hasStyleClass()/.removeStyleClass()
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Change colour of TextBox Web Component text on data chan

Postby roddy » Mon Nov 15, 2021 7:40 am

Thanks @ptalbot; that hit the mark :D
roddy
 
Posts: 100
Joined: Mon Oct 26, 2020 12:32 am


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 8 guests