cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MIA99s
Helper I
Helper I

Change button colour based on variable condition

Hye, I want to ask how can I change button colour based on variable that I have?

 

Button1: Set(varvisible,1)

Button2: Set(varvisible,2)

Button3: Set(varvisible,3)

 

So, if user click button1, the button1 colour change to blue and Button2 & Button3 will keep a normal (green) colour.

If user click button2, Button1 & Button3 will keep a normal (green) colour.

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi @MIA99s 

Set the Fill property of the buttons as follows:

Button1: If(varvisible=1, Blue, Green)

Button2: If(varvisible=2, Blue, Green)

Button3: If(varvisible=3, Blue, Green)

View solution in original post

2 REPLIES 2
timl
Super User
Super User

Hi @MIA99s 

Set the Fill property of the buttons as follows:

Button1: If(varvisible=1, Blue, Green)

Button2: If(varvisible=2, Blue, Green)

Button3: If(varvisible=3, Blue, Green)

@timl Thanks for helping me!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,924)