cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rho1967
Helper III
Helper III

Label Size autofit

Hi everyone,

Is it possible to make a Label the same size as the text that comes into it from the Gallery?

 

I have for example.
Sum(Len(Lbl_ShowInformation_Scroll.Size) + 768)

 

I understand that every font is different in size in size. But how can I calculate this so that the label fits exactly around the entered text?

 

Thank you
Raymond

1 ACCEPTED SOLUTION

Accepted Solutions
AmeerJab
Resolver I
Resolver I

Hello rho,

 

add a text input and set its width to be Len(Lbl_ShowInformation_Scroll.Size) * 21 (21 in here is the font size) you can adjust it based on your font size, this can work on text inputs, if you want your text input to appear as a label you can change its display mode to view

 

Regards.

 

Edit: it also works for labels 

View solution in original post

1 REPLY 1
AmeerJab
Resolver I
Resolver I

Hello rho,

 

add a text input and set its width to be Len(Lbl_ShowInformation_Scroll.Size) * 21 (21 in here is the font size) you can adjust it based on your font size, this can work on text inputs, if you want your text input to appear as a label you can change its display mode to view

 

Regards.

 

Edit: it also works for labels 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,717)