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
Solved! Go to Solution.
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.
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.
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
Glad that solved your problem - hope you have a great day too!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
187 | |
53 | |
52 | |
38 | |
38 |
User | Count |
---|---|
284 | |
97 | |
89 | |
81 | |
77 |