Aligning controls using snap lines

In the new IDE you can align controls using the snap lines; the thin blue lines that pop up when you drag controls around in the window designer. You see it appear in the screenshot below between the "Property" radio button and the drop down control, indicating that they are being align by the bottom edge of the controls.

Clarion 10 Snap lines and distance lines
Clarion 10 Snap lines and distance lines

You can also see two short lines above the drop down, which indicate optimal vertical space between the drop down control and the two radio buttons above.  The distance lines appear for both horizontal and vertical spacing.

The snap lines also appear when you are re-sizing controls which can be both good and bad.  It's good when you need to size multiple controls to be the same width or height, but it gets in the way if you just want to re-size a control, like for example the "Me and related users" radio button which originally extended outside of the group control, overlapping the border of the group.

You can re-size a control by holding down the shift key and then using the left/right, up/down arrow keys.  But you can also re-size them by using the mouse and without the snap lines getting in the way.  Simply hold down the Alt key on the keyboard and re-size or move the control with the mouse.  It will now ignore the snap lines and you can re-size and re-position at will.  Release the Alt key and the snap lines immediately appear and the control snaps into place.

Snap lines also work with multiple controls selected.

Clarion 10 Snap lines on multiple controls
Clarion 10 Snap lines on multiple controls

I use the snap lines a lot when lining things up and also the distance lines to set the distance from one control to another.  To the best of my knowledge they are not customizable in the IDE's Options, which would be desired so the distance can be changed.

Clarion 10 Window Designer Grid Options
Clarion 10 Window Designer Grid Options

You also have the option to use grids.  In my (limited) experience with grids in other environments, they tend to be coarse and not very helpful.  But this is a matter of choice and taste so please try them out to see how they work and if you like them or not.

There is no option to turn both grids and snap lines off.  Either one is always turned on.  However, with the grids you can turn off the "Snap to Grid" effectively disabling it and if you uncheck "Show grid" then it will not show up either so with that you have turned both grid and snap lines off.  It would have made sense to have a "None" radio button there for the Align Mode, but with the ability to select Grid and then effectively turning it off, it serves the same purpose.

Arnor Baldvinsson

Leave a Reply