The units of measurement for the position and size of an object.

Property of

Form, Report, SubForm, all form objects.

Description

metric is an enumerated property that can have the following values:

Value

Description

0

Chars (default)

1

Twips

2

Points

3

Inches

4

Centimeters

5

Millimeters

6

Pixels

The Chars metric is based on the average height and width for characters in a specific base font. The base font is set through the form’s scaleFontBold, scaleFontName, and scaleFontSize properties.

All position and size properties such as top, left, height, and width are expressed in the form’s current metric units. The form’s metric cannot be changed once the form is opened. If the form is closed, changing the metric scales the position and size properties of all the components on the form.

When a control is saved as a custom control, the metric of the form is saved with the control definition. This way, when the control is dropped on another form, assigning the original metric of the control will resize the control appropriately on the new form.  In order for this to work properly the custom control's metric property must be set after the control's left, top, height, and width properties are set.

Anytime a control's metric property is set (rather than a form's metric property), dBASE will compare the control's metric with its parent container's metric (usually its form).  If they are different, dBASE will  convert the control's left, top, height, and width values of the control from the control's metric to the parent container's metric.