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

# TSpeedButton

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

A Button used to represent states (checked or unchecked).

## Declaration

Source position: buttons.pp line 440

`type TSpeedButton = class(TCustomSpeedButton)`
`published`
`property Action: TBasicAction;` |  | The Action associated with the control.
`property Align: TAlign;` |  | Specifies the placement of the control on its Parent control.
`property Alignment: TAlignment;` |  | Horizontal alignment for the text displayed on the button control.
`property AllowAllUp: Boolean;` |  | Indicates if all buttons in a group can be in an up state.
`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 the bi-directional text mode for the control.
`property BorderSpacing: TControlBorderSpacing;` |  | Determines the inner and outer border spacing for this control.
`property Constraints: TSizeConstraints;` |  | Contains the minimum and maximum Width and Height for the control.
`property Caption: TCaption;` |  | String with the caption displayed for the control.
`property Color: TColor;` |  | The background color for the control.
`property DisabledImageIndex: TImageIndex;` |  | Ordinal position for the image displayed when the control is disabled.
`property Down: Boolean;` |  | Indicates if the button has been set to the Down state.
`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 Flat: Boolean;` |  | Indicates whether the button is displayed with a Flat (non-relief) appearance.
`property Font: TFont;` |  | The font to be used for text display in this control.
`property Glyph: TBitmap;` |  | The bitmap with the glyph image(s) displayed for button states.
`property GroupIndex: Integer;` |  | Identifies the group to which the speed button control belongs.
`property HotImageIndex: TImageIndex;` |  | Ordinal position for the glyph bitmap displayed when the mouse is hovered over the button control.
`property Images: TCustomImageList;` |  | List of images available for use as state glyphs on the control.
`property ImageIndex: TImageIndex;` |  | Ordinal position for the glyph bitmap displayed when the button is in its up state.
`property ImageWidth: Integer;` |  | Width for the glyph bitmap displayed on the control.
`property Layout: TButtonLayout;` |  | Indicates the alignment of the glyph bitmap relative to the caption for the control.
`property Margin: Integer;` |  | Space between the glyph bitmap and the aligned edge in the button layout.
`property NumGlyphs: Integer;` |  | The number of glyph bitmaps available for the control.
`property PressedImageIndex: TImageIndex;` |  | Ordinal position for the glyph bitmap displayed when the button is in a pressed (down) state.
`property SelectedImageIndex: TImageIndex;` |  | Ordinal position for the glyph bitmap displayed when the button is selected.
`property Spacing: Integer;` |  | Spacing between the Glyph bitmap and the Caption for the control.
`property Transparent: Boolean;` |  | Indicates if the control is drawn with transparency.
`property Visible: Boolean;` |  | Indicates if the control is visible on its parent.
`property ShowCaption: Boolean;` |  | Indicates if the Caption for the speed button is displayed.
`property ShowHint: Boolean;` |  | Enables Hint display for the 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 OnClick: TNotifyEvent;` |  | Notification handler for mouse clicks.
`property OnContextPopup: TContextPopupEvent;` |  | Invoked when a context-sensitive pop-up menu is requested.
`property OnDblClick: TNotifyEvent;` |  | Event handler signalled when a mouse double click occurs in the control.
`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 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 OnPaint: TNotifyEvent;` |  | Event handler signalled to paint the control.
`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 OnChangeBounds: TNotifyEvent;` |  | Event handler signalled when the Bounds for the control have been changed.
`end;`

## Inheritance

`TSpeedButton` |  | A Button used to represent states (checked or unchecked).
`TCustomSpeedButton` |  | The ancestor for the TSpeedButton class.
`TGraphicControl` |  | TGraphicControl is the base class for all lightweight controls.
`TControl` |  | The base class for visible controls.
`TLCLComponent` |  | The base class for LCL components which have an associated widget.
`TComponent`
?
`TObject`

## Description

The Speed Button is designed to automate a process when it is selected. An user pushes a button to start an action or set a mode.

When a user clicks on a SpeedButton focus is not shifted; a Speed Button never gets focus. The button may carry an descriptive glyph, and has a state (checked or not, etc).

## See also

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