I want to create a navigation bar using a horizontal gallery with buttons and labels, and I want to know how to make the label’s width change according to the text it contains in order to avoid empty spaces, as shown in the screenshot
I am not sure whether you want the Label or the Gallery Tempate size to be flexible here.
For the Label, there is no effective way of doing this precisely - you can set the Width to Len(Self.Text) * Integer (you will need to play with the Integer depending on the font type and size) - note that a W uses a lot more width than an I - but you should at least get a maximum width and get rid of some of the spacing.
If the Gallery, unfortunately, only Flexible HeightGalleries are available (not Flexible Width) - so all will be the same size. You may be able to set it to the maximum width you get from the text label.
Please ✅Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like ♥
Visit my blog Practical Power AppsLinkedIn
Was this reply helpful?YesNo
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.