Prompts\Fields not aligned on window the way I design them

Is this a know issue and if so, is there a work around.

I spent a lot of time aligning all my prompts/fields both vertically and horizontally .

When I close the window designer and then reenter the designer most of my horizontal positions are off by just a bit but is very noticeable.

I have grid settings at 2x2 and show\snap to grids on.

I even try using the “spread vertically” for the entry fields and then go back and align each row using “align middles” or “aligh tops” - but no change.

Any Ideas on how to have the screen render the way I design it?
My Client is pressing me really hard on this!




I don’t know if there’s an easy way. The formatter thinks in pixels, but the WINDOW structure thinks in DLU and it’s frustrating.

What I’ve done is create some fixup code for runtime, using PROP:Pixels to clean up the spacing and sizing.

Maybe there’s a better way to get apples to apples at design time, but I wasted a lot of time trying to find it.

1 Like

Perhaps not using snap to grid? The align your fields and save. I think that will keep the alignment as is.

My guess is theat the vertical heights of your fields are not in synch with the grid settings.

1 Like

All my fields have a height of 10 and the grid is set at 2

I set the options to Align Line and it seems to retain my positioning about 95% of the fields

From Help
Snap Lines

Aligning controls relative to each other in a form has always been a challenge. Snap lines are a new feature that give you visual suggestions to help you more easily place and size controls relative to each other. Snap lines appear when controls are dragged from the Toolbox or moved around the Window designer area. The advantage of snap lines is that you are given guidance on not only alignment, but also proximity. Not only can you line up the bottom border of a Prompt and Entry control, but you can also manage the distance between them to create a consistent aesthetically pleasing look.

Maybe post the first 20 lines of your Window here for us to see the code. E.g. to see if you have different Fonts on the controls then the Window Font(). Maybe to spot something else unusual.

I have never used the Snap to Grid to know how well it works. I see the Window Designer as created for .Net WinForms then repurposed for Clarion Windows. Many controls do not render at Design time identical to runtime.

Does your Window Previewer work? That would show a compiled Clarion program with the window so it should be perfect except, but missing runtime PROP: changes. My Window Previewer add on is what I use to figure how in the Window Preview program the exact right X,Y,W,H to enter into the Designer. Some controls are way off, like SPIN.

One thing I have learned is if you are trying to align Right, Bottom or Center it is important to have a specified Width / Height. Without you’re using Defaults and width will vary by picture and control, that does not work perfectly.

I’ve also noticed that if you select Multiple Controls then set them all to Same Width or Same Height it does NOT always work and set all controls. I would do that so a bunch of Right Aligned controls all have the same Width.

Does Snap to Grid actually move the controls when you reopen a Window? To verify that I would use the Window… Editor to change some AT() values to Odd Numbers, then open the Designer and see if it moves those to Even 2x2 positions? If Yes then I would turn that Off.

1 Like

I agree that this has long been a problem, perhaps depending upon control type.

My wild guess of the moment without testing - If fields are defined w/ height of 10, are prompts defined with the same or perhaps set for default?