cancel
Showing results for 
Search instead for 
Did you mean: 

Create Lock flag to lock a control on a screen

When using relative positioning of controls, the X and or Y properties are set to a formula.  It is very easy to attempt to select a control that is using relative positioning by clicking on it, and accidentally move it, which replaces the relative formula with an absolute value.

 

I propose that there is a "Lock Relative Controls" flag in the Canvas Apps Studio that prevents any control with a formula for an X and/or Y  from being manually repositioned unless the the "Lock Relative Controls" flag is disabled.  Ideally this flag would exist on the App or screen level, applying to all controls on the app/screen that are using relative positioning.  Bonus points if you can still reposition the control the control along any axis that is not using relative positioning.

Status: New
Comments
New Member

I agree it is very easy to inadvertently move a control when you select it which then replaces the position formula with an explicit X or Y value.

Why not prevent user from dragging control in dimension that's set by formula?

I.e. to be able to drag the control the X or Y formula needs to be empty.

MVP

@billblk If you're using absolute positioning, then nothing is really lost if you accidentally move the control, and then move it back.  Maybe you're off by a few pixels, but it probably doesn't matter.  But if the controls are using relative positioning, then if you move it 1 pixel, you lose your formula and moving it back makes it look like it should, but it no longer functions how it used to, relative to whatever was in the formula.  For that reason I'm not as concerned with locking the controls down using absolute position.  But if its easier for the lock implementation to truly lock down the control, regardless of absolute/relative positioning, then I won't complain.

 

If your request is to have the control "auto-locked" if the control has any value in the X/Y formula, that would seem really annoying to the controls I'm dragging around to have to clear the X/Y values in order to be able to drag it, and then clear them again to drag it again.

Helper V

It's very annoying when you accidentally move an element and erase the formula for positioning/size. Locking would be a really useful feature.

Regular Visitor

@Dlabar "Maybe you're off by a few pixels, but it probably doesn't matter."

 

It absolutely matters. Ignoring alignment that is off a few pixels is lazy and unprofessional.

MVP

So @TheBreeze I think you are saying that when you or someone else originally placed the control, they placed it perfectly the first time with absolute positioning?  I don't see this as being a likely scenario.  I see it being much more likely that they eye'd it, and when they moved it back, they'll just eye it again.  If they want it "pixel perfect" they would use relative positioning.  

Kudo Kingpin

@Dlabar@TheBreeze  If someone put a formula in the positioning, it should not be able to be moved manually. The formula is there for a reason. It's simple and logical. It's more annoying that PowerApps simply deletes any formula if you move something by mistake. Maybe there should be a lock symbol on formula positioned controls and if you "unlock" it you can move it manually.

New Member

There's a two-year-old idea on this same problem. Maybe if everyone who voted here also votes there some attention will be given to the problem 🙂