Skip to main content
Community site session details

Community site session details

Session Id : YwuoKzxmzNWD/ZUDLGytzu
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,155

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
    148,894 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

Announcing our 2025 Season 2 Super Users!

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2