Compartir a través de


How to: Manually Adjust Grid Display at Design Time

When you have added columns to the grid, you can change the width of the columns and the height of the rows. You can manually set the height and width properties of the column and row objects in the Properties window or visually set these properties in grid design mode.

To switch to grid design mode

  1. Choose Edit from the grid's shortcut menu.

    -or-

  2. In the Object box of the Properties Window (Visual FoxPro), select a column of the grid.

When you are in grid design mode, a thick border is displayed around the grid. To switch out of grid design mode, select the form or another control.

To adjust the width of the columns in a grid

  1. In grid design mode, position the mouse pointer between grid column headers so that the pointer changes to a bar with arrows pointing left and right.

  2. Select the column and drag until the column is the desired width

    -or-

    Set the column's Width property in the Properties window.

To adjust the height of the rows in a grid

  1. In grid design mode, position the mouse pointer between the first and second buttons on the left side of the Grid control so that the pointer changes to a bar with arrows pointing up and down.

  2. Select the row and drag until the row is the desired height.

    -or-

    Set the column's Height property in the Properties window.

    Tip

    You can prevent a user from changing the height of the grid rows at run time by setting the AllowRowSizing Property to false (.F.).

See Also

Tasks

How to: Set the Source of the Data Displayed in the Grid

How to: Set Up a One-to-Many Form Using the Grid Control

Concepts

Formatting Grids

Controls and Objects Created in Earlier Versions

Reference

Controls for Manipulating Rows of Data

Other Resources

Using Controls