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 / Get a label's height v...
Power Apps
Unanswered

Get a label's height value when the Auto height in on in canvas app

(0) ShareShare
ReportReport
Posted on by 65

I have a label (which auto height's property is on) in a gallery and this label is for description, so sometimes the length of label text is 400,380,214 etc. means it changes that's why auto height property is on, but the issue is I want to increase the template size basis of label's height means if height is high then template size should also be high and so on. How to achieve it since I'm getting the Label.Height as blank

gallery issue.png
Categories:
I have the same question (0)
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    I can get height of the label when auto height is on. You can set the template size according your label.Height property

    a10.jpg

  • Tourist Profile Picture
    65 on at

    Hi @zmansuri, take that label in the gallery for every row and then put it on template size of gallery it will give you blank

  • Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on at

    @Tourist 

     

    let's say you have 5 items to display in the gallery.

    Do you want to set for each displayed in the gallery item a different template height?

    if yes, it is not possible.

     

    on your screenshot:

    you can get the height of Label18 by using its height property as mentioned before (Label18.Height).

    If that Label18 is inside the gallery you can get the height of the first instance (item) only.

     

  • Tourist Profile Picture
    65 on at

    No @Alex_10 , I am getting height of every single instance

    Tourist_0-1625085309373.png

    as you can see the middle label has different value in every single row, its just I want to set it on template size but its giving blank there. 

  • Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on at

    @Tourist 

    inside your gallery you can get each instance's height as on your screenshot.

    I meant as for your purpose, template height will be the height of the first instance.

     

    gal.png

  • Tourist Profile Picture
    65 on at

    Okk @Alex_10 means I cannot make the template size dynamic based on the height of label???

  • Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on at

    @Tourist 

    there is a flexible height gallery option exist.

    with your current gallery type it is not possible.

  • Tourist Profile Picture
    65 on at

    @Alex_10 gallery which I using is already flexible one its not a normal gallery😶 still am facing the issue

  • Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on at

    @Tourist 

    got you now. in this case why do you need templatesize? in PLAY mode it will be adjusted automatically.

    in studio, you can check it by pressing and holding ALT. On the screenshot i have templatesize=280 (which takes effect in studio only)

    gal1.png

  • Tourist Profile Picture
    65 on at

    Tourist_0-1625087431784.png

    @Alex_10 OK see my gallery is nested in a main gallery, I have a table which has Category in it and there is another table where we chose in which category we want to add sub category, so a category can have multiple sub category and every sub category has description(Auto height label) so like in my Environment category I have 3 sub categories with their description and both these are displaying in nested gallery, so I want the template size dynamic I am using both of the galleries flexible 

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