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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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