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

Horizontal Radio Spacing

Hi,

 

I may be asking a silly question so please forgive me.  Is it still not possible to add spacing between radio buttons that have a horizontal layout?  Everything I have read so far says you can't.

 

Thank you for your help,

 

Joe

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User
Super User

@jkniffen 

No, you still cannot set that spacing on the radio control.  The best you can do is to imitate the radio control using a horizontal gallery.

 

I hope this is helpful for you.

_____________________________________________________________________________________
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

RandyHayes
Super User
Super User

@jkniffen 

Yes, that will work - not so graceful.

Another solution is to utilize the horizontal gallery.

1) Create a horizontal gallery.  For your example, I set the Items to:

   ["This is the text for Radio One", "This is the text for Radio Two"]

 

2) In the Gallery, add a Radio control and set the Items property to: [ThisItem.Value]  (note: the square brackets are important in this case).

 

3) In the OnSelect action of the Radio control, set the following formula:

    UpdateContext({lclChoice:Self.Selected.Value})

 

4) In the Default property of the Radio control, set the formula to: lclChoice

 

You can now expand the gallery control and radio control as much as you want to fill space as you like.

 

The lclChoice variable will contain the chosen value.

_____________________________________________________________________________________
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

7 REPLIES 7
RandyHayes
Super User
Super User

@jkniffen 

No, you still cannot set that spacing on the radio control.  The best you can do is to imitate the radio control using a horizontal gallery.

 

I hope this is helpful for you.

_____________________________________________________________________________________
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!

Thank you Randy.  I appreciate your help.  It's a shame the functionality isn't available.

RandyHayes
Super User
Super User

@jkniffen 

No problem.  I believe a lot of the things that seem so easy to implement get left by the wayside because there are some workarounds in place to accommodate.  So, they get low priority.  Maybe one day when they catch up on issue without a workaround, things will get better with these type of issues.

_____________________________________________________________________________________
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!

Hi Randy,

 

I kind of hacked my way through it but found a way to increase the horizontal spacing between two radio buttons.  Below are my individual settings and a screen shot of what it looks like live.

 

Items >>

[
"1111111111111111111111111111",
"1"
]

Color >> RGBA(0, 0, 0, 0)
BorderColor >> RGBA(0, 0, 0, 0)
HoverColor >> RGBA(0, 0, 0, 0)

 

I placed individual labels to the right of each Radio.

 

jkniffen_0-1627072028056.png

It's not graceful but it works.   🙂

 

 

RandyHayes
Super User
Super User

@jkniffen 

Yes, that will work - not so graceful.

Another solution is to utilize the horizontal gallery.

1) Create a horizontal gallery.  For your example, I set the Items to:

   ["This is the text for Radio One", "This is the text for Radio Two"]

 

2) In the Gallery, add a Radio control and set the Items property to: [ThisItem.Value]  (note: the square brackets are important in this case).

 

3) In the OnSelect action of the Radio control, set the following formula:

    UpdateContext({lclChoice:Self.Selected.Value})

 

4) In the Default property of the Radio control, set the formula to: lclChoice

 

You can now expand the gallery control and radio control as much as you want to fill space as you like.

 

The lclChoice variable will contain the chosen value.

_____________________________________________________________________________________
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!

Hi Randy,

 

Thank you for your feedback sir.  Your solution does look more graceful.   🙂   I am going to try it out as soon as I have a chance.

 

Thank you again for all your help sir,

 

Joe

RandyHayes
Super User
Super User

@jkniffen 

Happy to help!!

_____________________________________________________________________________________
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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,252)