cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PedroFernandes
Helper II
Helper II

button

Hi there

I'm using PowerApps for Teams, and I have a screen that's divided in four selectable parts: each one has a selection button. What I want to do is, when clicking the button, to change the color and border thickness of the selected element (as seen on the leftmost part of the screenshot), as well as changing from "View" to "Edit" the calendar date selector.

 

Any Idea on how I can achieve this? I know it could be easier with a group of radio buttons, but for that I would need to set it for a horizontal layout, and I don't have that option anywhere (I can only get the "LayoutMinHeight" and "LayoutMinWidth" values. Could this be because the content is inside a container?).

 

Thank you for your help

2 ACCEPTED SOLUTIONS

Accepted Solutions
PG_WorXz10
Resident Rockstar
Resident Rockstar

Hi @PedroFernandes ,

On select of buttons you can set variable and add the a switch case with those value in the Fill and Border of the buttons. 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

View solution in original post

StalinPonnusamy
Community Champion
Community Champion

Hi @PedroFernandes 

 

Set the Button 1 "Onselect" property to

UpdateContext({SelectedButton:1})

 

Set Button 1 Fill property to

If(SelectedButton = 1,RGBA(100,100,100,1),RGBA(56, 96, 178, 1))

 

  • Do the same action for all buttons (Just change value to 2, 3 and 4 accordingly)
  • Sam goes to Border as well

 

 

StalinPonnusamy_0-1628965827543.png

 

View solution in original post

3 REPLIES 3
PG_WorXz10
Resident Rockstar
Resident Rockstar

Hi @PedroFernandes ,

On select of buttons you can set variable and add the a switch case with those value in the Fill and Border of the buttons. 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

View solution in original post

StalinPonnusamy
Community Champion
Community Champion

Hi @PedroFernandes 

 

Set the Button 1 "Onselect" property to

UpdateContext({SelectedButton:1})

 

Set Button 1 Fill property to

If(SelectedButton = 1,RGBA(100,100,100,1),RGBA(56, 96, 178, 1))

 

  • Do the same action for all buttons (Just change value to 2, 3 and 4 accordingly)
  • Sam goes to Border as well

 

 

StalinPonnusamy_0-1628965827543.png

 

View solution in original post

PedroFernandes
Helper II
Helper II

That worked like a charm! Thank you so much for your help, I've been around this for hours!

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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