Skip to main content
Community site session details

Community site session details

Session Id : k0vPvfGlqeI9riCjkQUc1O
Power Apps - Building Power Apps
Unanswered

Change Color with OnChange Event

Like (0) ShareShare
ReportReport
Posted on 19 Sep 2022 20:59:55 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:
  • VJR Profile Picture
    7,635 on 20 Sep 2022 at 04:11:37
    Re: Change Color with OnChange Event

    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 :).

  • EricBLott Profile Picture
    248 on 19 Sep 2022 at 21:03:36
    Re: Change Color with OnChange Event

    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.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2