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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,838)