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 / A gallery that adapts ...
Power Apps
Answered

A gallery that adapts to the content

(0) ShareShare
ReportReport
Posted on by 171

I have a label in my gallery and the problem is that some entries have a lot of text and there is a lot of empty space and other entries are larger than the space allows. How can I change it so that the size of the box changes automatically? with a flexible height gallery I have not managed it.

Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    Assuming the text box auto-height feature does not give you what you need, and without knowing much about the configuration of your Gallery, one option is to consider adjusting the Height and Width property of the text box by the LEN of the text.

  • alt88 Profile Picture
    171 on at

    I am open to the configuration of the Gallery. I am currently looking for possibilities and solutions and would adopt the appropriate one.

  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    There isn't really an appropriate solution when it comes to a Gallery. The most reliable is option is ensure the text boxes in your flexible gallery are set to auto-height.

     

    One common trick is to add a label with auto height enabled, and then bind the height property of all controls to that label together with the template size property of the gallery. e.g.

     

    Min(200,YourLabel.Y + YourLabel.Height + 20)

     

    However, I find this still provides unstable results.

     

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/gallery-dynamic-sizing

     

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

     

     If I have answered your question, please mark your post as Solved.

    If you like my response, please give it a Thumbs Up.

  • alt88 Profile Picture
    171 on at

    thank you that is exactly what I had implemented, as I had not yet found a more clever solution.

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard