cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amitbdesai83
Microsoft
Microsoft

Color change when user click on BUTTON

HI,

 

I have three buttons where user I want to change color of button when user click on it until it close the app from power BI.

 

However, when other user open they should see original color for buttons.

 

The reason is i would like to user know which last button they clicked by changing color.

 

Is it possible? and if yes then how?

 

I played with PressedColor, Fill, PresssedBorderColor property but not working as expected. I have also created variable like UpdateContext({OneClicked: true}), this one click is working but color is not coming back to original when i open the form again.

 

Thanks

3 REPLIES 3
v-xiaochen-msft
Community Support
Community Support

Hi @amitbdesai83 ,

 

I did a sample for you.

Set onstart property of app:

Set(var,{button1:Blue,button2:Blue,button3:Blue})

 

Add 1st button and set its onselect property to:

Set(var,{button1:Red,button2:Blue,button3:Blue})

Set its Fill property to:

var.button1

 

Add 2nd button and set its onselect property to:

 

Set(var,{button1:Blue,button2:Red,button3:Blue})

 

Set its Fill property to:

 

var.button2

 

Add 3nd button and set its onselect property to:

 

Set(var,{button1:Blue,button2:Blue,button3:Red})

 

Set its Fill property to:

 

var.button3

 

 

Best Regards,

Wearsky

 

Thank you for your response. 

I will definitely try this solution and let you know the result.

 

Thank you again, Appreciate your intputs.

Hi,

 

So this is not working as expected.

 

Let me give more detail may that will help.

 

So I have two categories and each have 3 buttons.

 

1st Category = Low, Medium, High

2nd category = Black, Red, Yellow

 

All these values are in BUTTONS form.

 

Now If i click on Low Buttton then click On RED buttons which means I clicked on two buttons from two different categories. So, I would like to see both buttons to be highlighted together until I click on SUBMIT button.

 

Hope this will help you with more clarification.

 

Thanks

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,554)