Sign in Join
FPDoc Onlineexperiment

TCustomSpeedButton class

In unit Buttons

The ancestor for the TSpeedButton class.

Declaration

pascal
TCustomSpeedButton = class(TGraphicControl)

Inheritance

  1. TCustomSpeedButton
  2. TGraphicControl
  3. TControl
  4. TLCLComponent
  5. TComponent
  6. TPersistent
  7. TObject

Descends from it: TColorButton TSpeedButton

Description

TCustomSpeedButton is a TGraphicControl descendant, and the ancestor for TSpeedButton. If you want to define your own speed button class, you should derive it from TCustomSpeedButton.

A speed button is designed to automatically perform a process when it is pressed or clicked. The user can push the button to start an action or set a mode. When a user clicks on a speed button, focus is not shifted; a speed button never receives focus. The button may have a descriptive glyph (symbol or pictograph), and has state (checked, unchecked, Up, Down, Hovered, Selected, Disabled).

Properties

MouseInControlprotectedReturns True if the mouse pointer is in the display area for the control.
AlignmentpublicHorizontal alignment for the text displayed on the button control.
AllowAllUppublicIndicates if all buttons in a group can be in an up state.
ColorpublicThe background color for the control.
DisabledImageIndexpublicOrdinal position for the image displayed when the control is disabled.
DownpublicIndicates if the button has been set to the Down state.
DrawEffectsEnabledpublicEnables or disables Glyph drawing effects for mouse over and mouse down events on the control.
FlatpublicIndicates whether the button is displayed with a Flat (non-relief) appearance.
GlyphpublicThe bitmap with the glyph image(s) displayed for button states.
GlyphImageLayoutpublic
GroupIndexpublicIdentifies the group to which the speed button control belongs.
HotImageIndexpublicOrdinal position for the glyph bitmap displayed when the mouse is hovered over the button control.
ImagespublicList of images available for use as state glyphs on the control.
ImageIndexpublicOrdinal position for the glyph bitmap displayed when the button is in its up state.
ImageWidthpublicWidth for the glyph bitmap displayed on the control.
LayoutpublicIndicates the alignment of the glyph bitmap relative to the caption for the control.
MarginpublicSpace between the glyph bitmap and the aligned edge in the button layout.
NumGlyphspublicThe number of glyph bitmaps available for the control.
PressedImageIndexpublicOrdinal position for the glyph bitmap displayed when the button is in a pressed (down) state.
SelectedImageIndexpublicOrdinal position for the glyph bitmap displayed when the button is selected.
ShowAccelCharpublicIndicates if the accelerator key (shortcut) is displayed in the Caption for the control.
ShowCaptionpublicIndicates if the Caption for the speed button is displayed.
SpacingpublicSpacing between the Glyph bitmap and the Caption for the control.
TransparentpublicIndicates if the control is drawn with transparency.

Methods

WSRegisterClassprotectedRegisters this component class with the current WidgetSet.
ButtonGlyphprotectedGets the TButtonGlyph used for the control.
GetNumGlyphsprotectedGets the value for the NumGlyphs property.
GlyphChangedprotectedPerforms actions needed when the value in the Glyph property has been changed.
DialogCharprotectedPerforms actions needed to handle an accelerator key for the control.
CalculatePreferredSizeprotectedCalculates the default height and Width required for the control.
MeasureDrawprotectedCalculates the Width and Height for the layout used on the speed button and optionally renders the control.
MouseEnterprotectedSignals the OnMouseEnter event handler (when assigned).
MouseLeaveprotectedSignals the OnMouseLeave event handler (when assigned).
MouseDownprotectedPerforms actions needed for a mouse down event on the control.
MouseMoveprotectedPerforms actions needed for a mouse move message received for the control.
MouseUpprotectedSignals the OnMouseUp handler.
NotificationprotectedPerforms actions needed when a sub-component is added or removed for the control.
PaintprotectedUpdates the state for the control, and paints it to the control Canvas.
PaintBackgroundprotectedPaints the background for the control to the specified rectangle.
SetDownprotectedSets the value for the Down property.
SetGroupIndexprotectedSets the value for the GroupIndex property.
SetFlatprotectedSets the value for the Flat property.
SetMarginprotectedSets the value for the Margin property.
SetNumGlyphsprotectedSets the value for the NumGlyphs property.
SetSpacingprotectedSets the value for the Spacing property.
RealSetTextprotectedSets the value for the Caption property.
UpdateStateprotectedUpdates internal members used to track state changes in the control.
GetDrawDetailsprotectedGets the theme element details used to draw the control.
ActionChangeprotectedPerforms action when a new value is assigned to the Action property for the control.
GetActionLinkClassprotectedThe default ActionLink class (TControlActionLink).
GetControlClassDefaultSizeprotectedReturns the default dimensions for new instances of the class.
LoadedprotectedPerforms actions needed when LCL component streaming is completed for the control.
GetGlyphSizeprotectedGets the size of the glyph within the specified PaintRect.
GetTextSizeprotectedGets the size of the Caption text within the specified PaintRect.
DrawGlyphprotectedDraws the glyph image on the canvas at a given offset in the specified client rectangle.
CreatepublicCreate - constructor for TCustomSpeedButton: calls inherited Create and initializes many defaults and properties.
DestroypublicDestroy - destructor for TCustomSpeedButton: frees Glyph then calls inherited Destroy.
FindDownButtonpublicGets the speed button with the same GroupIndex that has its Down property set.
ClickpublicSignals OnClick and/or executes the ActionLink when the control has been clicked.
LoadGlyphFromResourceNamepublicLoads the image for the Glyph with the specified name from a resource instance.
LoadGlyphFromLazarusResourcepublicLoadGlyphFromLazarusResource - method for loading a glyph from a Lazarus Resource file (.lrs).

Fields

FStateprotectedInternal member used to store the TButtonState for the control.

Inherited

From TGraphicControl (6)

Canvas CMCursorChanged DoOnChangeBounds DoOnParentHandleDestruction FontChanged OnPaint

From TControl (396)

AccessibleDescription AccessibleName AccessibleRole AccessibleValue Action ActionLink ActiveDefaultControlChanged AddHandler AddHandlerOnBeforeDestruction AddHandlerOnChangeBounds AddHandlerOnEnabledChanged AddHandlerOnEnabledChanging AddHandlerOnKeyDown AddHandlerOnMouseWheel AddHandlerOnResize AddHandlerOnVisibleChanged AddHandlerOnVisibleChanging AdjustSize Align AnchorAsAlign AnchorClient AnchoredControlCount AnchoredControls AnchorHorizontalCenterTo AnchorParallel Anchors AnchorSame AnchorSide AnchorSideBottom AnchorSideChanged AnchorSideLeft AnchorSideRight AnchorSideTop AnchorToCompanion AnchorToNeighbour AnchorVerticalCenterTo AssignTo AutoAdjustLayout AutoSize AutoSizeDelayed AutoSizeDelayedHandle AutoSizeDelayedReport AutoSizePhases AutoSizing AutoSizingAll AutoSizingLockCount BaseBounds BaseParentClientSize BeforeDestruction BeforeDragStart BeginAutoDrag BeginAutoSizing BeginDrag BiDiMode BorderSpacing BoundsChanged BoundsRect BoundsRectForNewParent BringToFront CalculateDockSizes CanAutoSize CanTab Caption CaptureChanged CaptureMouseButtons ChangeBounds Changed ChangeScale CheckChildClassAllowed CheckNewParent CheckOnChangeBounds ChildClassAllowed ClientHeight ClientOrigin ClientRect ClientToParent ClientToScreen ClientWidth CMBiDiModeChanged CMChanged CMEnabledChanged CMHintShow CMHitTest CMMouseEnter CMMouseLeave CMParentBiDiModeChanged CMParentColorChanged CMParentFontChanged CMParentShowHintChanged CMSysFontChanged CMTextChanged CMVisibleChanged CNPreferredSizeChanged ColorIsStored ConstrainedResize Constraints ControlFontClass ControlOrigin ControlState ControlStyle ControlToScreen CreateAccessibleObject CreateControlBorderSpacing CreateFloatingDockSite Cursor DblClick DefineProperties DesktopFont DisableAutoSizing DoAllAutoSize DoAutoAdjustLayout DoAutoSize DoBorderSpacingChange DoCallKeyEventHandler DoCallMouseWheelEventHandler DoCallNotifyHandler Dock Docked DockOrientation DockTrackNoTarget DoConstraintsChange DoContextPopup DoDock DoDragMsg DoEndDock DoEndDrag DoFixDesignFontPPI DoFloatMsg DoMouseDown DoMouseUp DoMouseWheel DoMouseWheelDown DoMouseWheelHorz DoMouseWheelLeft DoMouseWheelRight DoMouseWheelUp DoOnResize DoOnShowHint DoScaleFontPPI DoSetBounds DoStartDock DoStartDrag DragCanceled DragCursor DragDrop Dragging DragKind DragMode DragOver EditingDone EnableAutoSizing Enabled EnabledChanged EnabledChanging EndAutoSizing EndDrag ExecuteCancelAction ExecuteDefaultAction FindSubComponent FixDesignFontsPPI Floating FloatingDockSiteClass Font ForeignAnchorSideChanged FormEndUpdated FormIsUpdating GetAccessibleObject GetAction GetAnchorsDependingOnParent GetCachedText GetCanvasScaleFactor GetChildAccessibleObjectAtPos GetChildrenRect GetClientOrigin GetClientRect GetClientScrollOffset GetColorResolvingParent GetControlOrigin GetCursor GetDefaultColor GetDefaultDockCaption GetDefaultHeight GetDefaultWidth GetDeviceContext GetDockEdge GetDragImages GetEnabled GetFloating GetFloatingDockSiteClass GetLogicalClientRect GetMouseCapture GetMousePosFromMessage GetPalette GetParentBackground GetParentComponent GetPopupMenu GetPreferredSize GetRGBColorResolvingParent GetScrolledClientRect GetSelectedChildAccessibleObject GetSidePosition GetTextBuf GetTextLen GetTopParent HandleObjectShouldBeVisible HasHelp HasParent Height HeightIsAnchored HelpContext HelpKeyword HelpType Hide Hint HostDockSite InitiateAction Invalidate InvalidateControl InvalidatePreferredSize IsAParentAligning IsBorderSpacingInnerBorderStored IsCaptionStored IsClientHeightStored IsClientWidthStored IsControl IsControlVisible IsEnabled IsParentColor IsParentFont IsParentOf IsProcessingPaintMsg IsRightToLeft IsVisible Left LMCaptureChanged LoadedAll LRDockWidth ManualDock ManualFloat MouseCapture MouseInClient OnChangeBounds OnClick OnConstrainedResize OnContextPopup OnDblClick OnDragDrop OnDragOver OnEditingDone OnEndDock OnEndDrag OnMouseDown OnMouseEnter OnMouseLeave OnMouseMove OnMouseUp OnMouseWheel OnMouseWheelDown OnMouseWheelHorz OnMouseWheelLeft OnMouseWheelRight OnMouseWheelUp OnQuadClick OnResize OnShowHint OnStartDock OnStartDrag OnTripleClick Parent ParentBackground ParentBiDiMode ParentColor ParentDestroyingHandle ParentFont ParentFontChanged ParentFormHandleInitialized ParentHandlesAllocated ParentShowHint ParentToClient Perform PopupMenu PositionDockRect QuadClick ReadBounds ReadState RealGetText Refresh RemoveAllHandlersOfObject RemoveHandler RemoveHandlerOnBeforeDestruction RemoveHandlerOnChangeBounds RemoveHandlerOnEnabledChanged RemoveHandlerOnEnabledChanging RemoveHandlerOnKeyDown RemoveHandlerOnMouseWheel RemoveHandlerOnResize RemoveHandlerOnVisibleChanged RemoveHandlerOnVisibleChanging Repaint ReplaceDockedControl RequestAlign Resize Scale96ToFont Scale96ToForm Scale96ToScreen ScaleConstraints ScaleDesignToForm ScaleFontsPPI ScaleFontTo96 ScaleFontToScreen ScaleFormTo96 ScaleFormToDesign ScaleScreenTo96 ScaleScreenToFont ScreenToClient ScreenToControl SendMoveSizeMessages SendToBack SessionProperties SetAction SetAlign SetAnchors SetAutoSize SetBiDiMode SetBounds SetBoundsKeepBase SetColor SetCursor SetDragMode SetEnabled SetHint SetInitialBounds SetName SetParent SetParentBackground SetParentBiDiMode SetParentComponent SetTempCursor SetTextBuf SetVisible SetZOrder ShouldAutoAdjust Show ShowHelp ShowHint TBDockHeight Text TextChanged Top TripleClick UndockHeight UndockWidth Update UpdateAnchorRules UpdateBaseBounds UpdateMouseCursor UpdateRolesForForm UseRightToLeftAlignment UseRightToLeftReading UseRightToLeftScrollBar Visible VisibleChanged VisibleChanging Width WidthIsAnchored WindowProc WMCancelMode WMContextMenu WMLButtonDBLCLK WMLButtonDown WMLButtonQuadCLK WMLButtonTripleCLK WMLButtonUp WMMButtonDBLCLK WMMButtonDown WMMButtonQuadCLK WMMButtonTripleCLK WMMButtonUp WMMouseHWheel WMMouseMove WMMouseWheel WMMove WMRButtonDBLCLK WMRButtonDown WMRButtonQuadCLK WMRButtonTripleCLK WMRButtonUp WMSize WMWindowPosChanged WMXButtonDBLCLK WMXButtonDown WMXButtonQuadCLK WMXButtonTripleCLK WMXButtonUp WndProc WriteLayoutDebugReport

From TLCLComponent (6)

DecLCLRefCount GetWSComponentClass IncLCLRefCount LCLRefCount NewInstance WidgetSetClass

From TComponent (65)

_AddRef _Release CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetTypeInfo GetTypeInfoCount iicrGetComponent InsertComponent Invoke IsImplementorOf Loading Name ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState

From TPersistent (4)

Assign FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (36)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.