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 / Center Labels Dynamically
Power Apps
Answered

Center Labels Dynamically

(0) ShareShare
ReportReport
Posted on by

Hello everyone,

 

I'm working on a fun little raffle app for the holidays. The length of the names of the winners are going to vary so my Width property formula for the Becky Bloom label is 22*Len(Label1.Text). I think 22 characters will be enough to accommodate our longest names. I set the X property of the Becky label to lblCongratulations.X, but as you can see it is left aligning. The Alignment property of the Becky label is Center. How do I get the Becky label to center dynamically under the Congratulations label? I wasn't able to find the solution in Community posts so any help you can give me would be appreciated. Also, if there is a chance that the Congratulations label could shift around as long/short names from the flow populate the name label, can you advise how to keep everything centered under the Holiday Party Raffle label? Thank you- Teresa

 

LabelSS.png

Categories:
I have the same question (0)
  • Verified answer
    timl Profile Picture
    37,210 Super User 2026 Season 1 on at

    HI Teresa

    Why not set the width of the Becky label equal to the width of the congratulations label? So long as the alignment property of both labels are set to centre, they should both be equally centre aligned.

  • tagustin2020 Profile Picture
    on at

    That's a great idea-thanks! The Congratulations label should be wide enough to accommodate even the longest full name of an employee. I entered the following formula into the Width property of the Becky label:

     

    lblCongratulations.Width

     

    Have a great day!

    Teresa

  • timl Profile Picture
    37,210 Super User 2026 Season 1 on at

    Glad that solved your problem - hope you have a great day too!

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 404

#2
timl Profile Picture

timl 344 Super User 2026 Season 1

#3
WarrenBelz Profile Picture

WarrenBelz 320 Most Valuable Professional

Last 30 days Overall leaderboard