cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jkniffen
Advocate II
Advocate 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 Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,482)