Skip to main content

Notifications

Community site session details

Community site session details

Session Id : M0jOIbpMKjUdav3LtEHsba
Power Apps - Building Power Apps
Unanswered

Can't accept that vertical alignment doesn't work when Auto height is enabled

Like (0) ShareShare
ReportReport
Posted on 14 Apr 2023 01:58:00 by 1,151

Hi,

 

Been working wth MS Support on this one and would have thought this to be a common use case scenario.

 

When running a flexible height gallery, if you turn on Auto Height for a column, which results in some rows increasing there size (which is perfect) BUT

 

the other columns vertical align doesn't work

 

(in my case I require them to be middle.

 

Interestingly enough, there was no responses to this question in my previous post.

 

Cheers

 

Todd

Categories:
  • EdViegas Profile Picture
    436 on 13 Apr 2024 at 17:18:16
    Re: Can't accept that vertical alignment doesn't work when Auto height is enabled

    Imagine your control with the auto-height option turned on is called AutoHeightControlName and is allways the tallest control). You can create a label control (lblTallest) inside the gallery with AutoHeightControlName.Height set as its Height property. Then, use Value(lblTallest.Text) to get the height of each gallery row.

    If AutoHeightControlName is not always the tallest control, use Max function in lblTallest.Text property including other control heights.

  • JGilbert Profile Picture
    2 on 13 Apr 2024 at 15:02:32
    Re: Can't accept that vertical alignment doesn't work when Auto height is enabled

    I've been having the same problem within containers, the autoheight works unless it's stretching to the size of the container. In this case the workaround is just to set align in container to centre but you would have expected it to respect the alignment in the text label for shorter text.

  • WarrenBelz Profile Picture
    146,645 Most Valuable Professional on 14 Apr 2023 at 02:25:51
    Re: Can't accept that vertical alignment doesn't work when Auto height is enabled

    Hi @Tango ,

    You could play with a conditional Y value for them based on the Height of the other label - this gets fairly close

    OherLabel.Height/2 - Self.Height + (Parent.TemplatePadding*2)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard
Loading started