Hello Everyone, I have enabled auto height property on the labels used inside a gallery but the content is overlapping on one another.
Is there any way to control the height of gallery template so that the content looks proper?
Attached screenshots for reference
Hi@v-jagoud,
Combine the screenshot you provided, I think that you have reached something limit.
I have a test which is confirmed on my side that once you reach the limitation in height with a Label, something wrong happened.
Absolutely you could set the AutoHeight property to make the Label automatically high, however, there is a limitation in height with the Label. If you exceed it, the AutoHeight property will not work.
Could you please tell me which Gallery you use, a vertical or a flexible?
As an alternative solution, I think a Flexible Gallery could achieve your needs.
I have a test on my side, please take a try as below.
I add a Button and set the OnSelect property to create a collection as below:
ClearCollect(tem,{test1:"agagwerhgshfds"},{test1:"agagwerhgshfdshfgdjfgdjds"},{test1:"agagweasgsfdhfdshfdjhfgkjghlklrhgshfdshfgdjfgdjdshhhhhhhhggffgtyuikkhbvcdstjnbftunyuhgg"})
Add a Flexible Gallery and insert a Label, set the Height of the Label as below:
RoundUp(Len(ThisItem.test1)/11,0)*36
Best Regards,
Qi
Hi @v-qiaqi-msft ,
Thanks for the reply.
I have updated the gallery template height to be dynamic as per your suggestion but, it doesn't seem to resolve the issue.
attached screenshot
Note: It looks like the only way is to increase the template height to accommodate the max length of the label(to accommodate the lengthy content) used inside the gallery but it would be the same for all the rows. attached screenshot
Hi@v-jagoud,
Based on the issue that you mentioned, do you want to make the Label automatically adjust the row of the Gallery?
It is not enough to set the AutoHeight property to "true".
Actually, the AutoHeight property was designed to estimate the content size and to adjust its height accordingly. A row within a Gallery might also be taller than you expect if it contains a control for which the AutoHeight property is set to true.
I have a test on my side, please take a try as below.
Best Regards,
Qi
Hello,
If I understand you correctly.
I think you need to put some code in the Y property of your labels
For example:
In label2 (the one under your first label, lets call it Label1) put this code in the Y property:
Label1.Y + Label1.Height +5
Replace "Label1" with your labels name
cheers
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473