Skip to main content

How to Make a Text Control Grow to Fit Its Text in Power Apps

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

A Text control has a fixed height, so text that needs more lines than it has room for is cut off. With Auto height on, the control grows to fit its text, and shrinks again when the text gets shorter.

The example is the Reports screen of the Overtime Timesheet app. Under its chart, a Text control, lblDepartmentTotalsRS, lists each department's hours, one per line, and the number of lines depends on the month. In the list of people under it, each card's second line names the person's departments, and wraps onto another line on a phone.

Step 1: Turn On Auto Height​

Select the Text control. In the Properties pane, on the Display tab, under Size and position, turn on Auto height:

The Size and position section of the Properties pane with Auto height On

In the formula bar, it's the AutoHeight property, set to true:

The formula bar with the AutoHeight property selected and true, and the preview strip reading true = true with Data type boolean

Microsoft's Text control reference describes it as whether the control automatically increases its height when the text content exceeds the visible area.

Step 2: Keep Wrap On​

Under Behavior, Wrap decides whether long lines continue on the next line. The reference says that with Wrap off, text is clipped at the control boundary. Leave it on for text that can be longer than the control is wide, such as the people's departments on a phone.

Step 3: Place What Comes Next​

A control that grows needs room below it:

Why Studio Can Show a Smaller Height​

In Studio, the department totals' Size and position showed Height 32, with Auto height on:

The Size and position section: Auto height On, Padding 5 on each side, Width 640 greyed out, Align in container Custom, Flexible height Off, and Height 32

In Studio, the screen had no report loaded, so the control was hidden and had no text. The reference explains the rest: When Visible is false, the Height output property doesn't update as text changes. In the app, with a month loaded, the control showed both of its lines.

The Result​

In the app, the department totals take the two lines they need, between the chart and the list of people:

The Reports screen for October 2026 with Approved hours in October 2026: 46.25, the chart, and under it the two lines Emergency Department: 30.50 hours and Radiology: 15.75 hours, followed by Approved hours by person and four cards

On a phone, the first card's departments wrap onto a second line, and the card is taller than the others to fit them:

The Reports screen at phone width, where the first person card, Admin User, is taller than the others, with 10.00 hours in Emergency Department, on one line and Radiology on the next

Common Mistakes​

MistakeWhat happensDo this instead
A fixed Height for text that variesExtra lines are cut offAuto height on
Wrap offLong lines are clipped at the edgeWrap on
A fixed Y under a growing controlThe text runs under the next controlA vertical container, or Y from the control above
Judging the height in StudioA hidden control doesn't update its HeightCheck in Preview or in the app

Troubleshooting​

SymptomLikely causeFix
The text is still cut offAuto height is off, or the container has a fixed heightTurn it on; let the container grow
Gallery rows overlap their textThe gallery's rows have a fixed heightA flexible height gallery
Height stays at its old value in StudioThe control is hiddenLook again when it's visible

FAQ​

Does the classic Label control have it too?​

Yes: Microsoft's Label reference lists AutoHeight for it as well.

Does it shrink back?​

Microsoft's gallery guide says that AutoHeight on a label causes it to grow or shrink to fit its content.

Conclusion​

Turn on Auto height, keep Wrap on, and put the control where the things below it can move: in a vertical container, or with their Y worked out from it. A hidden control doesn't update its Height, so check the result in Preview or in the app.

Additional Resources​