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 / Picking the maximum he...
Power Apps
Answered

Picking the maximum height

(0) ShareShare
ReportReport
Posted on by 1,168

Hi,

 

I have a flexible height gallery and want to put a rectangle "line" at the bottom of each record.

 

Each row has 6 labels.

 

Trying to work out what the approach is to make sure it sits on the bottom of the text. I tried an approach of picking what I thought was going to be the main culprit label that would always expand then set the y value to the width of that but turns out this is not always going to be the case. any label in the row could end up being the one that expands the height of the row.

 

Thanks in advance

 

Todd

Categories:
  • Verified answer
    AhmedSalih Profile Picture
    6,680 Moderator on at

    Hello, @Tango, Set the Y property of the rectangle shape to the following formula:

    Max(
     Label1.Y + Label1.Height,
     Label2.Y + Label2.Height,
     Label3.Y + Label3.Height,
     Label4.Y + Label4.Height,
     Label5.Y + Label5.Height,
     Label6.Y + Label6.Height
    )

    Replace Label1, Label2, Label3, Label4, Label5, and Label6 with the actual names of the labels in the gallery.

     

    If my reply helped you, please give a  👍 , & if it solved your issue, please give a 👍 & Accept it as the Solution to help other community members find it more.

    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.

    Visit my Blog: www.powerplatformplace.com

    Visit my YouTube Channel: https://www.youtube.com/@powerplatformplace/videos

     

  • Tango Profile Picture
    1,168 on at

    Thank you so much @AhmedSalih 

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @Tango, Always happy to help 🙂

  • Tango Profile Picture
    1,168 on at

    @AhmedSalih As a matter of interest can I also set a minimum height? (just a value)

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @Tango, yes you can.

  • Tango Profile Picture
    1,168 on at

    @AhmedSalih How?

     

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @Tango, it is a line so use these properties:

    AhmedSalih_0-1682473883017.png

     

     

  • Tango Profile Picture
    1,168 on at

    No, the minimum height of the entire row (each of the labels), like you initial solution but then adding a minimum value like say 30px, does that make sense?

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @Tango, got you! use the Gallery TemplateSize Property. 

  • IcE-TanK Profile Picture
    22 on at

    thanks Ahmed, what if I wanna anchor a label or a button at the end bottom of my canvas app, like to consider it as a footer! 

    I have tried many options and solutions but non of them worked...

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard