Compartir a través de


Aligning Controls in Forms

The buttons on the Layout toolbar make it easy to accurately line up controls in relation to each other in your forms. For example, you might want to align controls horizontally or vertically or make sure that a related set of controls has the same width or height. To align controls, select a group of controls, and then choose one of the layout buttons on the Layout toolbar.

Adjusting Control Placement

If you need to place controls precisely on the screen, you can use Show Position on the View menu. When checked, Show Position displays the coordinates and dimensions of a selected control in the status bar at the bottom of the Form Designer window.

Controlling the Grid Display

The grid display helps you align controls on your forms. You can adjust the size of the grid with Set Grid Scale on the Format menu. You can turn display of the grid on and off by using the Grid Lines command on the View menu, or setting the Grid Lines option on the Forms tab of the Options dialog box.

You can also adjust the size or position of controls in relation to the grid with Snap to Grid on the Format menu. When Snap to Grid is checked on the Form menu, controls placed on a Form are automatically aligned to the guidelines on the grid. You can override the grid by:

  • Clearing Snap to Grid on the Format menu. By default, this option is checked.
  • Using the arrow keys to align controls.
  • Pressing CTRL before clicking on a control and holding the CTRL key down while dragging the object to another position.
  • Choosing alignment options from the Layout toolbar or the Format menu.

See Also

Aligning Controls in Forms | Adding Visual FoxPro Containers | Adding User-Defined Objects to a Form | Creating Forms | Addition of Objects to Forms | Adding Properties and Methods to a Form | Adding Visual FoxPro Controls to a Form | Adding Controls to a Wizard-Generated Form | Adding User-Defined Objects to a Form | Selecting, Moving, and Resizing Form Controls | Setting Tab Order for Controls