When you create a new project and open a new form in form editing mode, the form's background does not contain a grid.
You can, however, view a grid during form editing to assist in aligning controls. You can turn on the grid by selecting Grid from the Tools menu. A dialog box appears and allows you to enter a grid size and to turn on display of the grid.
A value of 10 points in both the Width and Height fields is typically a good choice. The dialog box should thus look something like the following:
When the Display Grid feature is checked, it is easier to manually align controls to the grid. When using the automatic alignment tools, it does not matter whether the grid is turned on or not.
To do this, click the Align to Grid Icon , or simply right-click once on any control and select Align to Grid from the pop-up menu.
Additionally, the PowerCOBOL Form Editor provides several powerful functions for aligning controls. Several of these functions are provided to work on groups of controls.
These functions are available from the Layout Menu or as icons directly on the Form Editor tool bar.
These include the following functions that work on single or groups of controls:
Right and Left Centering - Centers a control or group of controls between the right and left borders of a form.
Bottom and Top Centering - Centers a control or group of controls between the top and bottom borders of a form.
Additionally, the following functions work only on groups of controls. Note that alignment is always relative to the one selected control in the group (surrounded by a blue border). White borders will surround the other controls in a selected group. You may change the relative control (blue bordered control) by simply left clicking on another control in the group).
Adjust Left - Aligns the entire group along a straight left edge.
Adjust Right - Aligns the entire group along a straight right edge.
Adjust Top - Aligns the entire group along a straight edge that is parallel with the top border.
Adjust Bottom - Aligns the entire group along a straight edge that is parallel with the bottom border.
Width Match - Resizes all controls in the group so that their width matches the control in the blue border.
Height Match - Resizes all controls in the group so that their height matches the height of the control in the blue border.
Size Match - Resizes all controls in the group so that their sizes match the width and height of the control in the blue border.
Horizontal Space Equalization - Arranges the controls in the group so that they are evenly spaced on a horizontal line.
Vertical Space Equalization - Arranges the controls in the group so that they are evenly spaced on a vertical line.