cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KieranJM
Level: Powered On

Link Icon Colour to Button Colour (Probably an Easy One?)

Hi 

 

I have a blue Button (for Submit Form) which is disabled when certain conditions aren't met; this disablement turns it from blue to grey.

 

I have a relevent icon sitting on this button but I'd like to match its colour at any particular time to that of the Button.

 

I've tried some Ifs but my formula game isn't great.  Any ideas?

 

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
KieranJM
Level: Powered On

Re: Link Icon Colour to Button Colour (Probably an Easy One?)

Thanks for all the suggestions!  I was able to use these to create an IF statement to control the colour.  In my Icon's Colour I tried:

 

If(Button1.DisplayMode = "disabled",Button1.DisabledBorderColor, Button1.Color)

 

Thanks again.

View solution in original post

5 REPLIES 5
mdevaney
Level 8

Re: Link Icon Colour to Button Colour (Probably an Easy One?)

@KieranJM 

You can make the icon match the background color of the button by changing.  Change these properties in your icon to the following code below.

 

Color: Button1.Fill
Fill: Button1.Fill

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

Highlighted
Community Support Team
Community Support Team

Re: Link Icon Colour to Button Colour (Probably an Easy One?)

Hi @KieranJM ,

Do you want to link the Icon color to the Button Color?

 

I have made a test on my side, please take a try with the following workaround:

Set the Color property of the Icon to following formula:

Button1.Fill          /* <-- Bind it to Button's Fill proeprty */

In addition, you could also consider control the Color property of the Icon using same formula logic that you used to control your Button's Fill property.

 

If you want to bind the Color property of the Icon to Button's Color property, please use the following formula:

Button1.Color

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AlexN
Level 8

Re: Link Icon Colour to Button Colour (Probably an Easy One?)

Icon.Color --> The color of the "symbol"

Icon. Fill --> the background color of the icon

 

Button.Color --> the font color of the button

Button.Fill --> the background color of the button

 

 

KieranJM
Level: Powered On

Re: Link Icon Colour to Button Colour (Probably an Easy One?)

Thanks for all the suggestions!  I was able to use these to create an IF statement to control the colour.  In my Icon's Colour I tried:

 

If(Button1.DisplayMode = "disabled",Button1.DisabledBorderColor, Button1.Color)

 

Thanks again.

View solution in original post

mdevaney
Level 8

Re: Link Icon Colour to Button Colour (Probably an Easy One?)

@KieranJM 

Please make sure to close the thread if you have found the solution.

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 437 members 6,316 guests
Please welcome our newest community members: