cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TML
Advocate III
Advocate III

Toggle Fill missing?

I am using a toggle in a gallery to show the status.  I have been able to set the color of the toggle "button" based on its true or false value.  However, I am setting the background of the gallery's currently selected row to dark gray.  This makes the background fill around the text dark gray as well.  I want the background around the text to be white at all times.  See me screen shot below.  The first two are not selected, the third one is.  It makes the text hard to read.  Wouldn't this normally be the "Fill" property?  I don't have a "Fill".  I have TrueFill and FalseFill which sets the color or the toggle button.

ToggleFill.jpg

Am I mising where to set this?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@TMLyes, it does not have a fill property to it like you suggest.

One workaround is to put a rectangle shape underneath it and set its fill to white.  That will always give you a white background to that toggle.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

5 REPLIES 5
RandyHayes
Super User
Super User

@TMLyes, it does not have a fill property to it like you suggest.

One workaround is to put a rectangle shape underneath it and set its fill to white.  That will always give you a white background to that toggle.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
RusselThomas
Microsoft
Microsoft

Hi TML,


The Toggle control doesn't have a standard Fill property that I'm aware of.

The easiest way to achieve the effect you're looking for is to insert a rectangle icon, make it white and place it just behind the toggle control.

 

Hope this helps,

 

RT

too quick @RandyHayes 😉

Thanks Randy & Russel... I should have thought of that myself.  Seems weird that every control under the sun has a fill but not the toggle.  It even has a "HandleFill" which is the round circle that slides left and right.

I know what you mean...seems like they didn't expose that one.

 

The GOOD news is that you can now use Components and create your own control that would have a White shape under a Toggle control.  Expose whatever properties you want and then reuse it in your App without having to add a bunch of shapes to all your toggles. Definite "Like" for Components (even though still experimental).

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

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

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (1,768)