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

# TBitBtn

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

A button with a small image attached.

## Declaration

Source position: buttons.pp line 238

`type TBitBtn = class(TCustomBitBtn)`
`published`
`property Action: TBasicAction;` |  | The Action associated with the control.
`property Align: TAlign;` |  | Specifies the placement of the control on its Parent control.
`property Anchors: TAnchors;` |  | The set of anchor definitions for this control.
`property AutoSize: Boolean;` |  | Allows automatic adjustment of the size for the control, according to its content.
`property BidiMode: TBiDiMode;` |  | Indicates whether text controls use in bi-directional reading.
`property BorderSpacing: TControlBorderSpacing;` |  | Determines the inner and outer border spacing for this control.
`property Cancel: Boolean;` |  | True if the button is the modal Cancel button.
`property Caption: TCaption;` |  | Contains the descriptive text displayed for the Bitmap button control.
`property Color: TColor;` |  | The background color for the control.
`property Constraints: TSizeConstraints;` |  | Contains the minimum and maximum Width and Height for the control.
`property Default: Boolean;` |  | True if the button is the default button in a modal form.
`property DefaultCaption: Boolean;` |  | Indicates if Caption contains the default value for the button Kind.
`property DisabledImageIndex: TImageIndex;` |  | Ordinal position for the image displayed when the button is Disabled.
`property DragCursor: TCursor;` |  | The cursor shape shown during a drag operation.
`property DragKind: TDragKind;` |  | Indicates the action performed for a drag operation: drag-and-drop or drag-and-dock.
`property DragMode: TDragMode;` |  | Determines how a drag operation is started for the control.
`property Enabled: Boolean;` |  | Determines whether the control responds to mouse or keyboard input.
`property Font: TFont;` |  | The font to be used for text display in this control.
`property Glyph: TBitmap;` |  | Bitmap with the Glyph displayed on the control.
`property GlyphShowMode: TGlyphShowMode;` |  | Indicates the policy for showing or hiding the glyph image for the button.
`property HotImageIndex: TImageIndex;` |  | Ordinal position for the bitmap displayed when the button control is hot (hovered).
`property Kind: TBitBtnKind;` |  | Specifies the button kind including the default bitmap and caption for the button control.
`property Layout: TButtonLayout;` |  | Layout or alignment for the glyph bitmap and caption on the control.
`property Margin: Integer;` |  | The space prior to the glyph bitmap on the aligned edge of the button layout.
`property ModalResult: TModalResult;` |  | Value returned when the control is clicked in a modal form.
`property NumGlyphs: Integer;` |  | The number of glyph bitmaps available for the control.
`property Images: TCustomImageList;` |  | Contains the list of images available for use as the glyph on a custom button control.
`property ImageIndex: TImageIndex;` |  | Ordinal position for the default bitmap displayed when the button control is up (not pressed).
`property ImageWidth: Integer;` |  | Width for the value in Images displayed on the button control.
`property ParentBidiMode: Boolean;` |  | Indicates whether the BiDiMode settings in the Parent control are used.
`property ParentFont: Boolean;` |  | Indicates if the Font from the Parent control is used in the control.
`property ParentShowHint: Boolean;` |  | If True, the value of ShowHint for the control will be the same as the one from the Parent. Default is True.
`property PopupMenu: TPopupMenu;` |  | A context-sensitive menu that pops up when the right mouse button is clicked over this control.
`property PressedImageIndex: TImageIndex;` |  | Ordinal position for the bitmap displayed when the button control is pressed (down).
`property ShowHint: Boolean;` |  | Enables Hint display for the control.
`property Spacing: Integer;` |  | The space reserved between the bitmap and the caption on the button control.
`property TabOrder: TTabOrder;` |  | Indicates the navigation order for the control when the user presses the Tab or Shift+Tab key.
`property TabStop: Boolean;` |  | Allows the user to navigate to / from the control by pressing the Tab or Shift+Tab keys.
`property Visible: Boolean;` |  | Indicates if the control is visible on its parent.
`property OnChangeBounds: TNotifyEvent;` |  | Event handler signalled when the Bounds for the control have been changed.
`property OnClick: TNotifyEvent;` |  | Notification handler for mouse clicks.
`property OnContextPopup: TContextPopupEvent;` |  | Invoked when a context-sensitive pop-up menu is requested.
`property OnDragDrop: TDragDropEvent;` |  | Event handler signalled when an object is dropped onto the control.
`property OnDragOver: TDragOverEvent;` |  | Event handler signalled when a control is dragged over the control instance.
`property OnEndDrag: TEndDragEvent;` |  | Event handler signalled for the end of a drag-drop operation.
`property OnEnter: TNotifyEvent;` |  | Event handler signalled when the control receives focus.
`property OnExit: TNotifyEvent;` |  | Event handler signalled when the control loses focus.
`property OnKeyDown: TKeyEvent;` |  | Event handler signalled when a key is down while the control has focus.
`property OnKeyPress: TKeyPressEvent;` |  | Event handler signalled when a key is pressed while the control has focus.
`property OnKeyUp: TKeyEvent;` |  | Event handler signalled when a key is released while the control has focus.
`property OnMouseDown: TMouseEvent;` |  | Event handler signalled when a mouse down event is handled for the control.
`property OnMouseEnter: TNotifyEvent;` |  | Event handler signalled when the mouse pointer has entered the control.
`property OnMouseLeave: TNotifyEvent;` |  | Event handler signalled when the mouse pointer has left the control.
`property OnMouseMove: TMouseMoveEvent;` |  | Event handler signalled when the mouse pointer is moved in the control.
`property OnMouseUp: TMouseEvent;` |  | Event handler signalled when a mouse up event is handled for the control.
`property OnMouseWheel: TMouseWheelEvent;` |  | Event handler for mouse wheel turned.
`property OnMouseWheelDown: TMouseWheelUpDownEvent;` |  | Event handler signalled for a downward movement of the mouse wheel.
`property OnMouseWheelUp: TMouseWheelUpDownEvent;` |  | Event handler signalled for an upward movement of the mouse wheel.
`property OnResize: TNotifyEvent;` |  | Notification handler for a resize of the control.
`property OnStartDrag: TStartDragEvent;` |  | Event handler signalled for the start of a dragging operation.
`property OnUTF8KeyPress: TUTF8KeyPressEvent;` |  | Handler for a character entered by the user.
`end;`

## Inheritance

`TBitBtn` |  | A button with a small image attached.
`TCustomBitBtn` |  | TCustomBitBtn - the ancestor class for TBitBtn.
`TCustomButton` |  | The base class for a push button control.
`TButtonControl` |  | Specifies a base class for button controls.
`TWinControl` |  | Implements a windowed control which can contain other child controls.
`TControl` |  | The base class for visible controls.
`TLCLComponent` |  | The base class for LCL components which have an associated widget.
`TComponent`
?
`TObject`

## Description

TBitBtn is a TCustomBitBtn descendant which provides the interface used to display a button with a glyph (or image) and a caption. It performs an action when the button is clicked.

TBitBtn sets the visibility for properties introduced in ancestor classes.

## See also

How To Use Standard Controls |  | How to use StdCtrls, ComCtrls or ExtCtrls.