TCustomSpeedButton class
The ancestor for the
TSpeedButton class.
Declaration
TCustomSpeedButton = class(TGraphicControl)Inheritance
- TCustomSpeedButton
- TGraphicControl
- TControl
- TLCLComponent
- TComponent
- TPersistent
- 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
MouseInControl | protected | Returns True if the mouse pointer is in the display area for the control. |
Alignment | public | Horizontal alignment for the text displayed on the button control. |
AllowAllUp | public | Indicates if all buttons in a group can be in an up state. |
Color | public | The background color for the control. |
DisabledImageIndex | public | Ordinal position for the image displayed when the control is disabled. |
Down | public | Indicates if the button has been set to the Down state. |
DrawEffectsEnabled | public | Enables or disables Glyph drawing effects for mouse over and mouse down events on the control. |
Flat | public | Indicates whether the button is displayed with a Flat (non-relief) appearance. |
Glyph | public | The bitmap with the glyph image(s) displayed for button states. |
GlyphImageLayout | public | |
GroupIndex | public | Identifies the group to which the speed button control belongs. |
HotImageIndex | public | Ordinal position for the glyph bitmap displayed when the mouse is hovered over the button control. |
Images | public | List of images available for use as state glyphs on the control. |
ImageIndex | public | Ordinal position for the glyph bitmap displayed when the button is in its up state. |
ImageWidth | public | Width for the glyph bitmap displayed on the control. |
Layout | public | Indicates the alignment of the glyph bitmap relative to the caption for the control. |
Margin | public | Space between the glyph bitmap and the aligned edge in the button layout. |
NumGlyphs | public | The number of glyph bitmaps available for the control. |
PressedImageIndex | public | Ordinal position for the glyph bitmap displayed when the button is in a pressed (down) state. |
SelectedImageIndex | public | Ordinal position for the glyph bitmap displayed when the button is selected. |
ShowAccelChar | public | Indicates if the accelerator key (shortcut) is displayed in the Caption for the control. |
ShowCaption | public | Indicates if the Caption for the speed button is displayed. |
Spacing | public | Spacing between the Glyph bitmap and the Caption for the control. |
Transparent | public | Indicates if the control is drawn with transparency. |
Methods
WSRegisterClass | protected | Registers this component class with the current WidgetSet. |
ButtonGlyph | protected | Gets the TButtonGlyph used for the control. |
GetNumGlyphs | protected | Gets the value for the NumGlyphs property. |
GlyphChanged | protected | Performs actions needed when the value in the Glyph property has been changed. |
DialogChar | protected | Performs actions needed to handle an accelerator key for the control. |
CalculatePreferredSize | protected | Calculates the default height and Width required for the control. |
MeasureDraw | protected | Calculates the Width and Height for the layout used on the speed button and optionally renders the control. |
MouseEnter | protected | Signals the OnMouseEnter event handler (when assigned). |
MouseLeave | protected | Signals the OnMouseLeave event handler (when assigned). |
MouseDown | protected | Performs actions needed for a mouse down event on the control. |
MouseMove | protected | Performs actions needed for a mouse move message received for the control. |
MouseUp | protected | Signals the OnMouseUp handler. |
Notification | protected | Performs actions needed when a sub-component is added or removed for the control. |
Paint | protected | Updates the state for the control, and paints it to the control Canvas. |
PaintBackground | protected | Paints the background for the control to the specified rectangle. |
SetDown | protected | Sets the value for the Down property. |
SetGroupIndex | protected | Sets the value for the GroupIndex property. |
SetFlat | protected | Sets the value for the Flat property. |
SetMargin | protected | Sets the value for the Margin property. |
SetNumGlyphs | protected | Sets the value for the NumGlyphs property. |
SetSpacing | protected | Sets the value for the Spacing property. |
RealSetText | protected | Sets the value for the Caption property. |
UpdateState | protected | Updates internal members used to track state changes in the control. |
GetDrawDetails | protected | Gets the theme element details used to draw the control. |
ActionChange | protected | Performs action when a new value is assigned to the Action property for the control. |
GetActionLinkClass | protected | The default ActionLink class (TControlActionLink). |
GetControlClassDefaultSize | protected | Returns the default dimensions for new instances of the class. |
Loaded | protected | Performs actions needed when LCL component streaming is completed for the control. |
GetGlyphSize | protected | Gets the size of the glyph within the specified PaintRect. |
GetTextSize | protected | Gets the size of the Caption text within the specified PaintRect. |
DrawGlyph | protected | Draws the glyph image on the canvas at a given offset in the specified client rectangle. |
Create | public | Create - constructor for TCustomSpeedButton: calls inherited Create and initializes many defaults and properties. |
Destroy | public | Destroy - destructor for TCustomSpeedButton: frees Glyph then calls inherited Destroy. |
FindDownButton | public | Gets the speed button with the same GroupIndex that has its Down property set. |
Click | public | Signals OnClick and/or executes the ActionLink when the control has been clicked. |
LoadGlyphFromResourceName | public | Loads the image for the Glyph with the specified name from a resource instance. |
LoadGlyphFromLazarusResource | public | LoadGlyphFromLazarusResource - method for loading a glyph from a Lazarus Resource file (.lrs). |
Fields
FState | protected | Internal 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.
