Fixing Order Entry Layout (Anchors) - A fools errand?

I spent WAY too much time this weekend trying to fix an Order Entry customizations with a messed up layout. And every time I think I’m successful it turns out to be broken again.

So I’ve a few questions regarding layouts and how anchors work (or are supposed to work)

The field help for the anchors property in the customization window says:


I take that to mean that the size of the control (whose Anchor property I’m setting) will be maintained with respect to the parent container’s size. That correct (at least what the intent is, whether it actually works or not)?

If I had a container (say a sheet) that has a size of 1000,500, and I place a grid in it with the following properties:

  • Anchor: T, B, L, R
  • Location: 100,50
  • Size: 850, 425

I’d expect the grid to be in the sheet with margins (space between the sheet’s perimeter and the grids edges) of L:100, T: 50, R: 50, B: 25. And those margins to be maintained when the sheet is resized.

You can’t directly set the Right and Bottom margins, but rather they are inferred from the location and size values.

When you view the custom data with the customization maintenance program you see properties AnchorLeft and AnchorTop. These make sense (assuming they are the left and top margins). But there’s no AnchorBottom or AnchorRight. Just AnchorHeight and AnchorWidth - which always seem to be the same values as the Height and Width properties.

Am I on the right track or just wasting my time?


Forgot to mention… It seems like the underlying properties related to anchors are set differently, depending on whether you manually enter a value for location or size properties, vs dragging and/or resizing a control with the mouse. Anyone else see this?

Yes, I’ve seen that very annoying. Usually I will release the anchors until I get the control located where I want and sized, then reset the anchors back.

1 Like

I think this might be the very key. It sounds like that when the Anchor property is not ‘none’, any changes to the size or position cause some sort of background calculation for what the AnchorXXXXX values should be. And that the calc is different depending on manually entry verses dragging the control around.

Another weird thing is that the parents (or the parent’s parent) properties change when this calc is performed. Almost like all controls positions are actually absolute, such that moving one requires recalculating the position and size off all controls, all the way back to the Form itself.