Notifications
Announcements
Hello,
Need my gallery width (and the X of the buttons inside it) adjusted dynamically based on the gallery item with the longest name, to avoid names be clipped like this:
Expected:
The items are filtered dynamically so if the record with long name is not there, I'd expect:
Any ideas?
Thanks,
Hi @JK2020 ,
Yes you can do it - a bit of mathematics involved. your Gallery Width
Max(Len(YourFieldName.Text))*x+y
where x is the number of pixels a character takes up on average and y the number of pixels for the rest of your gallery width. You could also do the width of the label using the same principle without the yI have tested this and it works.
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.
Thank you, @WarrenBelz , this is what I was looking for (I think), the only problem is that now the gallery width changes depending on which gallery item I click on - was it the same in your testing? The "YourFieldName" in your formula is the label name of the gallery item, right?
@JK2020 ,
Yes it is the label name. I must admit I did not go clicking around it - just checked the formula worked.
You are right it adjusts with the selected item.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 717 Most Valuable Professional
Michael E. Gernaey 329 Super User 2025 Season 2
Power Platform 1919 268