web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Radio button layout
Power Apps
Answered

Radio button layout

(0) ShareShare
ReportReport
Posted on by 254

I have a powerapp which is connected to a SharePoint list.  I've created a collection and I'm using this collection to populate radio buttons. I want to show the radio options horizontally like so.

Capture.JPG

 

 I have found the layout option and changed it to horizontal but it looks horrible! (see below)

 

Capture1.JPG

 

How can I align the radio buttons as per the first image?

 

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

    Change the layout to Horizontal. Then try and shrink the size:

    Horizontal.JPG

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Manc_Gurl Profile Picture
    254 on at

    I already changed the layout to horizontal but shrinking the width doesn't help because the words for my options are different lengths.

     

    Capture3.JPG

  • Manc_Gurl Profile Picture
    254 on at

    I'm guessing there is no option to align the radio buttons horizontally.  I'm now wondering if I will have to develop some kind of workaround for this.  Perhaps creating two sets of vertical radio buttons but only pulling the first and last three options (FirstN and LastN) through as radio buttons.   Ugh more work!

     

    If I use the above method though, how can I make sure they only select one option? I don't want them to be able to select more than one option from these six options, and now that they're two sets of radio buttons they will be able to do just that.

     

     

  • eka24 Profile Picture
    20,925 on at

    You can abbreviate the Names in the Radio items by creating a collection OnVisible of the Screen:

    ClearCollect(MyNewTable,AddColumns(Table1,"NewColumn",Left(name,2)))
    In this case meaning take the first 2 letters Adjust it to suit you).
     
    Then use the collection MyNewTable on the Items as:
    Radio2.JPG
     
    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
  • Manc_Gurl Profile Picture
    254 on at

    Thanks but the customer won't be happy with abbreviated names.  I'm going to have to figure it out using a different method with vertical radio buttons I think.  Not ideal but better than nothing.  Would be nice if there was a text padding option for horizontal radio buttons.

  • Verified answer
    Manc_Gurl Profile Picture
    254 on at

    I resolved this myself.  I was able to use the horizontal layout for my radio buttons but this left the text for each value misaligned due to the fact that it's not possible to control the alignment of text and my text was different lengths.

     

    In the end I had to do a workaround by splitting my radio options into two vertical option groups.  I then used some functions in the onselect property so that if one set was selected the other set was deselected.  Not ideal but it did the job, there is a user voice suggestion here so get voting:  https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Control-spacing-between-Horizontal-Radio-Buttons/idi-p/302731

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    1. Use a gallery.
    2. For each gallery row add a radio button AND a label.
    3. The radio button must have two values to simulate selected or unselected..
      • NOTE: (yes/no to True or false or 1 or 0 values) 
    4. Then the label will display the value for the current row which is the collection/gallery value.
    5. Set the radio layout property to vertical.
    6. Size the radio button with the two options to only show 'selected' (yes or true or 1) radio button.
    7. Take the label and give it a a background color to match the forms background color (so that the control background is no longer transparent) and drag the label to cover the right side of the radio button control.
    8. The goal is to line up the label and the radio button to look like one radio button with label control within the gallery.
    9. This is our own custom radio button list control while benefiting from the gallery's clean alignment.
    10. Radio control on change add the behavior to make sure the every time a row gets selected to set the other collection values for the radio button is set to unselected (no or false or 0).
  • vDaddy78 Profile Picture
    31 on at

    I know this is old but apparently, suggestions are still needed. Here is what I did:

    I set the radio button font to a fixed-width font. 

    Took the longest word and set all radios buttons to that letter count

    I used a code so that I could get numerical values from the radio buttons later.

    radiobuttons.png

     

     

     

     

     

     

     

     

     

     

    I then set the Font color, hover color, pressed color all to transparent.

    I then used labels and placed them where needed for the correct text of the radio.

    I set the Reorder on each label so that its alignment was all the way to the back this way you don't have to click on the radio itself for it to select. 

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

#2
11manish Profile Picture

11manish 224

#3
Valantis Profile Picture

Valantis 181

Last 30 days Overall leaderboard