LeftMargin, TopMargin, RightMargin, BottomMargin Properties

LeftMargin, TopMargin, RightMargin, BottomMargin Properties

See Also                  Applies To

You can use the LeftMargin, TopMargin, RightMargin, and BottomMargin property to specify or determine the location of information displayed within a label or text box control. For example, you might want display information in a text box control starting 0.25 inches from the left and top margins.

Setting

A control's displayed information location is the distance measured from the control's left, top, right, or bottom border to the left, top, right, or bottom edge of the displayed information. Setting the LeftMargin or TopMargin property to 0 places the displayed information's edge at the very left or top of the control. To use a unit of measurement different from the setting in the Regional Settings Properties dialog box in Windows Control Panel, specify the unit, such as cm or in (for example, 3 cm or 2 in).

In Visual Basic, use a numeric expression to set the value of this property. Values are expressed in twips.

You can set these properties by using the property sheet, a macro, or Visual Basic.