web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Change Color with OnCh...
Power Apps
Unanswered

Change Color with OnChange Event

(0) ShareShare
ReportReport
Posted on by

Hi, I am trying to change the font color of a text input box when an on change event has occurred. 

 

So when the box is first displayed it has text saved from a our table which is displayed in black.  When the user changes this text I would like the tool to then show the font color as Red until the Save button is clicked. 

 

I have tried everything that I know in the OnChange event, and cannot get it to work. 

 

Any help appreciated! 

 

Thanks

RBrookhart

Categories:
  • EricBLott Profile Picture
    248 on at

    You can use the UpdateContext() function to set a local variable value to the color you want, then set the label's font color property to that variable. OnChange, you'll update the variable's value and the font will change.

    ---
    If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

  • VJR Profile Picture
    7,635 on at

    The OnChange event triggers when you press Tab or come out of the textbox. So it wont change the color as you type, but will change once you type and come out of the textbox.

     

    You can check the behavior of the Onchange event by simply setting a variable initially to False and in the OnChange set it to True and have a label on your screen to display that variable's value. It will turn to True after you come out of the box and not as you type.

     

    The KeyPress event of Visual Basic used to do this :).

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard