cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
new_to_this
Helper I
Helper I

Form - change width and X

Hello fellow powerappers,

 

I am wondering how I can change both width and X positioning of a form. I am using relative positioning and width for all my other controls in my app, however, for form it is not working. By "not working" I mean that the form is displayed correctly, but no changes in width and/or positioning are conducted. What is the reason for that?

 

For instance, I am using the below formula for the width property of my form:

  • Width=Parent.Width

For X I am using the below:

  • X=Parent.Width/2 - Self.Width/2

Both without any success, however, for all other controls I am using the above formulae just work properly. Even if I add the above to the different cards within my form anything happens.

 

Any suggestions?

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
C-Papa
Super User
Super User

i think you formula is wrong, if the form width is Parent.Width, lets say that is 1000. and the X = Parent.Width/2 - Self.Width/2, which is 1000/2 = 500 - 1000/2 = 500 = 0, therefore regardless of the size of the screen, the form width is full screen width and X is always 0, this means the form will always be at 0 and always take up all available space in width. to test this you could change the form width to Parent.Width *0.5

View solution in original post

2 REPLIES 2
C-Papa
Super User
Super User

i think you formula is wrong, if the form width is Parent.Width, lets say that is 1000. and the X = Parent.Width/2 - Self.Width/2, which is 1000/2 = 500 - 1000/2 = 500 = 0, therefore regardless of the size of the screen, the form width is full screen width and X is always 0, this means the form will always be at 0 and always take up all available space in width. to test this you could change the form width to Parent.Width *0.5

View solution in original post

new_to_this
Helper I
Helper I

That works. Great! Thank you.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,800)