web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Resizing label + recta...
Power Apps
Answered

Resizing label + rectangle control to fit?

(0) ShareShare
ReportReport
Posted on by 997

Hello,

How can i make 2 controls fit as 1?

TimmyBoy_0-1709381256276.png

They have to fit in with but seems i can't fix that
In side my gallery
I tried:

Parent.TemplateWidth/4,5+Len(ThisItem.field_7)+35

and also

Parent.TemplateWidth/3+Len(ThisItem.field_7)+35

But won't  fix the size, it get all the same size instead the size of the text

 Thank you

Categories:
I have the same question (0)
  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    I'm not completely sure what you're asking but if you want the rectangle to be the same size and position of the label, you only need to adjust the rectangle properties:

    Width: Label1.Width
    Height: Label1.Height
    X: Label1.X

    Y: Label1.Y

    This will still work if you have Auto Height selected on the label.

    If I've misunderstood, supply some more details and I might be able to help

  • TimmyBoy Profile Picture
    997 on at

    Hi @DJ_Jamba 
    Well, i just want to resize the rectangle with the text we have in the label
    So it gets both the same width
    I think you can compare it with the bubbles of a chat
    So you will see the bubble get the same size of the text.
    Thank you

  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    ok so you have you tried resizing the rectangle as proposed in my previous post?

  • TimmyBoy Profile Picture
    997 on at

    Yes i did,

    TimmyBoy_0-1709386952239.png

    As you see its not getting the same result i like to retrieve
    to long or to short 😞
    I want to make it look like this for example i found online

    TimmyBoy_1-1709387044154.png

     

  • Verified answer
    DJ_Jamba Profile Picture
    2,837 Moderator on at

    ok - a little clearer now 😀
    The rectangle should be a few pixels larger then the width & height of the label, so try:

    Width: Label1.Width + 4
    Height: Label1.Height + 4
    X: Label1.X - 2

    Y: Label1.Y - 2

     

  • TimmyBoy Profile Picture
    997 on at

    Hi @DJ_Jamba 

    Cool, that did the trick

    TimmyBoy_0-1709387534900.png

    Thank you so much 😉

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard