[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Buttons' (#lcl)

# TCustomBitBtn.Margin

The space prior to the glyph bitmap on the aligned edge of the button layout.

## Declaration

Source position: buttons.pp line 227

`public property TCustomBitBtn.Margin : Integer read FMargin write SetMargin default - 1;`

## Description

Margin is an Integer property with the space reserved prior to the Glyph or image displayed on the button control. It occurs on the aligned edge specified in Layout, and refers to a number of pixels. The value -1 has special meaning; it causes the glyph and caption to be centered on the button surface.

The default value for the property is -1. Changing the property value causes the widgetset class instance to be updated when its handle has been allocated. AdjustSize is called to auto-size a visible control and its parent. At design-time, the Invalidate method is called to redraw the control.

The property value is used in the InitializeWnd method to set the initial value in the widget class.

Use Layout to specify the edge on the button control to which the glyph bitmap and caption are aligned.

Use Spacing to set the space reserved between the glyph bitmap and the caption for the control.

## See also

TCustomBitBtn.Caption |  | Contains the descriptive text displayed for the Bitmap button control.
TCustomBitBtn.Glyph |  | Bitmap with the Glyph displayed on the control.
TCustomBitBtn.Images |  | Contains the list of images available for use as the glyph on a custom button control.
TCustomBitBtn.ImageIndex |  | Ordinal position for the default bitmap displayed when the button control is up (not pressed).
TCustomBitBtn.Layout |  | Layout or alignment for the glyph bitmap and caption on the control.
TCustomBitBtn.Spacing |  | The space reserved between the bitmap and the caption on the button control.