Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Changing the PaddingLeft of Individual Check Boxes

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I have a field with multiple checkboxes, and I want to change the PaddingLeft of certain ones (whilst leaving others alone).  Here is an example of how it currently appears:

 

Option #1

Option #2

Option #3

Option #4

 

Here is an example of how I want it to appear:

 

Option #1

Option #2

     Option #3

     Option #4

 

Any ideas?  Thank you!

Categories:
  • Re: Changing the PaddingLeft of Individual Check Boxes

    Thank you so much!

  • Verified answer
    mmollet Profile Picture
    mmollet 3,187 on at
    Re: Changing the PaddingLeft of Individual Check Boxes

    This is made from 5 text boxes and 2 icons.

    Top text box text property: If(IsBlank(selectedoption), "Select an Option", selectedoption)

    x4 Options on select: UpdateContext({selectedoption: Concatenate(selectedoption," ",Self.Text)})

    x4 options visible property: showdropdown

    Arrow down icon on select: UpdateContext({showdropdown: !showdropdown})

    "X" icon on select: UpdateContext({selectedoption: Blank()})

  • Re: Changing the PaddingLeft of Individual Check Boxes

    Really, really appreciate you working on this for me.  Would you mind showing me how you did that?  Happy to accept this as the solution; this should fit my needs perfectly.

  • mmollet Profile Picture
    mmollet 3,187 on at
    Re: Changing the PaddingLeft of Individual Check Boxes

    Untitled (1).gif

    Admittedly this is not as perfect as an actual combobox but its the only way I know to do what you want. This will also output a single string which can be patched to a List and then searched through as well.

     

    • This allows for selecting the same thing multiple times but that could be easily solved using a context variable.
    • This does not have maximum number of choices but again that could be easily solved using a context variable.
    • This also does not allow you to remove one selected item but rather removes them all at once at which point the user would have to readd all the choices. Depending on use case this may or may not matter at all.
  • mmollet Profile Picture
    mmollet 3,187 on at
    Re: Changing the PaddingLeft of Individual Check Boxes

    By static I mean that they dont change where dynamic would mean they do change. Basically will the choices in your dropdown be the same at all times or is your dropdown based on a SP list or something that can change from day to day?

     

    As for multiple selections let me see what I can come up with real quick. Never done this specific thing before but im almost certain it is possible.

  • Re: Changing the PaddingLeft of Individual Check Boxes

    By 'static' do you mean only one selection allowed?  Apologies, relatively new to all of this.

     

    If your method allows for multiple selections, I would love to know how you did that.

  • mmollet Profile Picture
    mmollet 3,187 on at
    Re: Changing the PaddingLeft of Individual Check Boxes

    Ah yeah I am not sure that this is possible using the dropdown control in Power Apps. If you have a static set of items in the dropdown you could always make your own. Here is an example: Untitled.gif

     

  • mmollet Profile Picture
    mmollet 3,187 on at
    Re: Changing the PaddingLeft of Individual Check Boxes

    You could also do this with if statments based on what you need. Here is an example where If Option #1 is selected Option #3 and Option #4 are set to 50 left padding else they are set to 0 left padding

    Screenshot 2023-04-12 at 1.31.04 PM.png

     

    Screenshot 2023-04-12 at 1.31.10 PM.png

     

  • Re: Changing the PaddingLeft of Individual Check Boxes

    Thanks for the quick responses.  My mistake, I should've been more clear.

     

    Here is a screenshot of the way it looks on Power Apps:

     

    2023-04-12_11-30-26.png

     

    I can't seem to edit the individual options within that drop down to be indented.  Do you know if that's possible?

  • mmollet Profile Picture
    mmollet 3,187 on at
    Re: Changing the PaddingLeft of Individual Check Boxes

    Are you trying to do this dynamically or will it be the same ones every time? If its the same ones then why not just manually change those paddings on the ones you want to have it?

     

    Screenshot 2023-04-12 at 1.29.04 PM.png

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard