[Overview][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 not, etc)

## Declaration

Source position: buttons.pp line 351

`type TSpeedButton = class(TCustomSpeedButton)`
`published`
`property Action;` |  | The action to be associated with this control
`property Align;` |  | Used to align the control to the top, bottom, left or right of its client.
`property AllowAllUp;` |  | Boolean flag to determine whether all buttons are allowed to be Up (default false)
`property Anchors;` |  | The set of anchor definitions for this control
`property AutoSize;`
`property BidiMode;`
`property BorderSpacing;` |  | Determines the border spacing for this control
`property Constraints;` |  | Determine Constraints (max and min height and width) for this control
`property Caption;` |  | Caption - the text-string appearing on the Control, usually used to identify its function
`property Color;` |  | Determine the colour for the current control
`property Down;` |  | The button has been set in the Down state
`property Enabled;` |  | Whether the control is Enabled (read/write). If not, it usually appears 'greyed-out'
`property Flat;` |  | Whether the button is to be displayed Flat or in relief
`property Font;` |  | The font to be used for text in this control (read/write).
`property Glyph;` |  | The Bitmap glyph to be used on this button
`property GroupIndex;` |  | The Index within the group of speedbuttons
`property Layout;` |  | The button layout - Glyph at top, bottom, left or right
`property Margin;` |  | Margin - the space around glyphs
`property NumGlyphs;` |  | The number of Glyphs available
`property Spacing;` |  | Spacing around button
`property Transparent;` |  | Whether button is transparent
`property Visible;` |  | Visible - can the control be seen?
`property OnClick;` |  | Event Handler for mouse click
`property OnDblClick;` |  | Event Handle for mouse double-click
`property OnMouseDown;` |  | Event handler for when a mouse button is pressed down
`property OnMouseEnter;` |  | Event handler for when the mouse enters the area of the current control
`property OnMouseLeave;` |  | Event handler for when the mouse leaves the area of the current control
`property OnMouseMove;` |  | Event handler for mouse movement within the current control
`property OnMouseUp;` |  | Event handler for when the mouse button is released, ie "up"
`property OnPaint;` |  | OnPaint - event handler for request to paint canvas
`property OnResize;` |  | Event Handler for resize of control
`property OnChangeBounds;` |  | Event handler for a change in bounds of the control
`property ShowCaption;` |  | Should caption be displayed?
`property ShowHint;` |  | Flag to determine: Is hint to be displayed for this control?
`property ParentBidiMode;`
`property ParentFont;` |  | ParentFont - should the control use the same font as the parent? Default is true
`property ParentShowHint;` |  | ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true
`property PopupMenu;` |  | PopupMenu - a context-sensitive menu that pops up when the right mouse button is clicked over this control
`end;`

## Inheritance

`TSpeedButton` |  | A Button used to represent states (checked or not, etc)
`TCustomSpeedButton` |  | The ancestor class for TSpeedButton
`TGraphicControl` |  | TGraphicControl is the base class for all lightweight controls.
`TControl`
`TLCLComponent` |  | TLCLComponent - base class for LCL components
`TComponent,IUnknown,IInterfaceComponentReference`
`TPersistent`
`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

HowToUseStdCtrls |  | How to use StdCtrls, ComCtrls or ExtCtrls

The latest version of this document can be found at lazarus-ccr.sourceforge.net .