Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 2zA+CPR7nR8N91oBhoXh96

Components from Components - Extendable Text Input

wyattdave Profile Picture wyattdave 406 Super User 2025 Season 1
In web pages when there is a text area for multiline inputs the component often has the functionality to extend the area to make it easier to input text:


Luckily there is a way to do this in Power Apps, though we have to get very creative

There is no official out of the box drag-able component (just custom components), but there is one component that actually does have the feature, the new slider.

So we are going to use the slider as our drag-able input.

First we set the OnChange parameter to:

If(
    Not(Self.Value=50) And viHeight<200 And Self.Value<50,Set(viHeight,viHeight+20);Reset(Self),
    Not(Self.Value=50) And viHeight>50 And Self.Value>50,Set(viHeight,viHeight-20);Reset(Self)
)

This has 2 options, grow and shrink, all depending on the value. So we know if it is above 50 it is going up (shrinking), and below 50 it is going down (less then 50).
We also need to
  • Checks that it is not at the default value of 50 (else we would have infinite loop, with it triggering every reset)
  • Checks that it is not over our minimum or maximum height
  • Update the variables we use to set the inputs size
  • Reset the slider back to default.

By resetting it we get continue movement.

We set our mulitline text area height to the height variable and finally we need to make sure our slider moves with the text box. We use the same variable but add it to the sliders y parameter.

tinMultiline.Y+(tinMultiline.Height-Self.Height)
tinMulitline is the text input multiline componet, so we use it to stay relative to it

And you end up with this:

https://i.imgur.com/fBKKlKn.gif

You can also do other crazy things with the same premise, like a box you can drag (ish) :


https://i.imgur.com/PjAuUEv.gif



This is a series of short blogs designed to help create new components from existing components, keep your eyes out for more
Stacked Notification Toasts 
Dynamic List Sorter

l also do long form and broader Power Platform blogs here https://dev.to/wyattdave
code snippet widget

Comments