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

Auto adjust font size to fit inside label?

I'm wondering if it's possible to have a label's (or text input's, or whatever else) font size change to fit all text inside the label's dimensions.

 

For example, I have a label with the text property of: "Description: " & DescriptionVariable.

So the label's text ends up looking like: Description: Blah blah black with yellow trim blah blah or whatever the DescriptionVariable is for that item.

Some Descriptions are short and fit within the bounds of my label, others are really long and you can't see the entire thing.

I can't increase the size of my label due to space constraints so I was hoping I could have the font size auto-adjust to make all the text fit.

7 REPLIES 7
Super User II
Super User II

One of the long approaches could be.

Using if else.
so in the font property of that label

If(Len(Label6.Text) < 6,10,20)

What this is doing is getting the length of label and then assigning the two fonts in between. You can make more sizes adjusted by adding nested same nested if conditions.
Super User
Super User

Hi,

 

When you select the Label you can see on the right an option for Overflow as "Hidden" change it to "Scrollable"

 

Please let us know if this helps

@Rahber: That's what I was hoping I wouldn't have to do. It felt tedious to try to account for all the different lengths the Description could possibly be.

 

@JayMagness: Unfortunately this app is designed for mobile phone use, so on a phone the scroll bar is itty bitty and bothersome to try and move with a finger.

Super User III
Super User III

Set the Wrap and Auto-Height of the Label to true.

 

Also check:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Font-size-based-on-height-of-label/m-p/53725...

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

@eka24 Wrap is true, I should have mentioned that was a given. But Auto-Height changes the height of the label, not the font size. This would cause the label to overflow on top of other parts of the app.

 

I had seen the post you linked, but it's in regards to label height. In my case I worrying about the amount of text and resizing font based on that. It's sounding like what I want doesn't exist in PowerApps.

Hi,

 

Is is possible to move the app to Landscape this will give you more room and screen real estate to work with?

 

Just another thought, I have had to do this a few times.

 

Jay 

Sorry about that. If it is LabelA, click on the it and change the size to: LabelA.Height

Edited

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (79,339)