Sign in Join
FPDoc Onlineexperiment

TCustomFloatSpinEdit class

In unit Spin

The base class for a spin edit control using a floating point value.

Declaration

pascal
TCustomFloatSpinEdit = class(TCustomEdit)

Inheritance

  1. TCustomFloatSpinEdit
  2. TCustomEdit
  3. TWinControl
  4. TControl
  5. TLCLComponent
  6. TComponent
  7. TPersistent
  8. TObject

Descends from it: TCustomSpinEdit TFloatSpinEdit

Description

TCustomFloatSpinEdit is a TCustomEdit descendant which implements the base class for the float-based spin edit control. It provides an edit control where the Float value can be entered directly, and up / down buttons which can be used to increment or decrement the value for the control.

Use the Value property to assign a floating point value to the control as a Double type. Value is a 64-bit real type in the range 5.0E-324 .. 1.7E308 (inclusive), and allows up to 15-16 digits of precision (15 digits for a negative value).

At run-time, setting Value to a number outside of the range for the real type causes Value to be updated. When neither MinValue nor MaxValue have been assigned, either -Inf or +Inf is displayed as the value for the control. If either MinValue or MaxValue has been given an explicit non-default value, the Value property is updated with corresponding range limit.

In LCL version 3.0, the floating point property editor will not allow an invalid value to be stored in the Value property at design-time. An error is raised (and handled) with the message 'Property value out of range', and the Value property is not updated.

LCL versions prior to 3.0 allowed the values +Inf, -Inf, and NaN to be assigned as the property value. These values are no longer supported in LCL version 3.0 and later.

Use the MinValue and MaxValue properties to define the lower and upper limits for the Value in the control. Like Value, they are implemented as a Double type with the same range limits. An invalid value causes the property to be set to the corresponding range limit for the real type.

Use the DecimalPlaces property to specify the number of decimal digits displayed for a value not represented using the radix/precision/exponent format for the IEE 754 value.

Use the Increment property to set the value added to or subtracted from the control Value when the up or down buttons are clicked.

Modified in LCL version 3.0 to implement range checking with floating point property editor support.

See also

Properties

DecimalPlacespublicNumber of the decimal places displayed in the spin edit control.
EditorEnabledpublicIndicates whether the value for the control can be entered directly into its edit box.
IncrementpublicAmount applied to the control value when the up or down arrow button is pushed.
MinValuepublicMinimum value allowed in the spin edit control.
MaxValuepublicMaximum value allowed in the spin edit control.
ValuepublicThe floating point value for the spin edit control.
ValueEmptypublicIndicates that a value has not been assigned for the control.

Methods

WSRegisterClassprotectedRegisters this component class with the current WidgetSet.
ChangeprotectedUpdates Modified prior to sending control messages and signalling OnChange handler(s).
EditingDoneprotectedPerforms actions when editing has been completed for the control.
RealGetTextprotectedGets the value for the text in the control.
RealSetTextprotectedUpdates Modified and the TextHint display when storing the new Text value.
TextChangedprotectedUpdates the control state when the value in Text has been changed.
SetDecimalsprotectedSets the value for the DecimalPlaces property.
SetValueprotectedSets the value for the Value property.
SetMaxValueprotectedSets the value for the MaxValue property.
SetMinValueprotectedSets the value for the MinValue property.
SetValueEmptyprotectedSets the value for the ValueEmpty property.
SetIncrementprotectedSets the value for the Increment property.
InitializeWndprotectedCreates or re-creates the handle for the windowed control.
FinalizeWndprotectedFrees the handle for the windowed control.
LoadedprotectedPerforms actions when LCL component streaming is completed.
KeyPressprotectedHandles key press events for the control.
GetControlClassDefaultSizeprotectedGets the default size for new instances of the class.
CreatepublicConstructor for the class instance.
GetLimitedValuepublicLimits the specified value to the minimum and maximum values for the control.
ValueToStrpublicConverts the specified value to a String type using the spin edit settings.
StrToValuepublicConverts the specified string to a float value according to spin edit settings.

Inherited

From TCustomEdit (70)

AddHandlerOnChange Alignment AutoSelect AutoSelected AutoSize BorderStyle CalculatePreferredSize CanShowEmulatedTextHint CanUndo CaretPos CharCase ChildClassAllowed Clear ClearSelection CMWantSpecialKey CopyToClipboard CreateParams CutToClipboard Destroy DoEnter DoExit EchoMode EmulatedTextHintStatus FontChanged GetCaretPos GetNumbersOnly GetReadOnly GetSelLength GetSelStart GetSelText GetTextHint HideSelection KeyUpAfterInterface Layout MaxLength Modified MouseUp NumbersOnly OnChange Options ParentColor PasswordChar PasteFromClipboard PopupMenu ReadOnly RemoveAllHandlersOfObject RemoveHandlerOnChange SelectAll SelLength SelStart SelText SetCaretPos SetCharCase SetEchoMode SetNumbersOnly SetReadOnly SetSelLength SetSelStart SetSelText SetTextHint ShouldAutoAdjust TabOrder TabStop Text TextHint Undo WMChar WMKillFocus WMSetFocus WndProc

From TWinControl (223)

AddControl AdjustClientRect AlignControls AllAutoSized AutoAdjustLayout AutoSizeDelayed AutoSizeDelayedHandle AutoSizeDelayedReport AutoSizePhases BeginUpdateBounds BorderWidth BoundsLockCount BroadCast Brush BrushCreated CachedClientHeight CachedClientWidth CanFocus CanSetFocus CanTab ChangeScale ChildHandlesCreated ChildKey ChildSizing ClientRectNeedsInterfaceUpdate CMBiDiModeChanged CMBorderChanged CMDoubleBufferedChanged CMEnabledChanged CMEnter CMExit CMParentDoubleBufferedChanged CMShowHintChanged CMShowingChanged CMVisibleChanged CNChar CNKeyDown CNKeyUp CNSysKeyDown CNSysKeyUp ContainsControl ControlAtPos ControlCount ControlKeyDown ControlKeyUp Controls ControlsAligned CreateBrush CreateDockManager CreateHandle CreateParented CreateParentedControl CreateSubClass CreateWnd CustomAlignInsertBefore CustomAlignPosition DefaultHandler DefWndProc DesignerDeleting DestroyHandle DestroyWnd DialogChar DisableAlign DoAddDockClient DoAdjustClientRectChange DoAlignChildControls DoAllAutoSize DoAutoSize DoChildSizingChange DockClientCount DockClients DockDrop DockManager DockOver DockSite DoConstraintsChange DoDockClientMsg DoDockOver DoDragMsg DoFlipChildren DoFloatMsg DoGetDockCaption DoKeyDownBeforeInterface DoKeyPress DoKeyUpBeforeInterface DoRemainingKeyDown DoRemainingKeyUp DoRemoveDockClient DoSendBoundsToInterface DoSendShowHideToInterface DoSetBounds DoubleBuffered DoUnDock DoUndockClientMsg DoUTF8KeyPress EnableAlign EndUpdateBounds EraseBackground FindChildControl FindNextControl FixDesignFontsPPIWithChildren FixupTabList FlipChildren Focused FormEndUpdated GetAdjustedLogicalClientRect GetBorderStyle GetChildren GetChildrenRect GetClientOrigin GetClientRect GetControlIndex GetControlOrigin GetDeviceContext GetDockCaption GetEnumeratorControls GetEnumeratorControlsReverse GetMouseCapture GetParentHandle GetPreferredSizeClientFrame GetSiteInfo GetTabOrderList GetTextLen GetTopParentHandle Handle HandleAllocated HandleNeeded InsertControl IntfGetDropFilesTarget IntfUTF8KeyPress Invalidate InvalidateBoundsRealized InvalidateClientRectCache InvalidatePreferredChildSizes IsClientHeightStored IsClientWidthStored IsControlMouseMsg IsFlipped IsResizing IsSpecialSubControl KeyDown KeyDownAfterInterface KeyDownBeforeInterface KeyUp KeyUpBeforeInterface LockRealizeBounds MainWndProc NotifyControls OnAlignInsertBefore OnAlignPosition OnDockDrop OnDockOver OnEnter OnExit OnGetDockCaption OnGetSiteInfo OnKeyDown OnKeyPress OnKeyUp OnUnDock OnUTF8KeyPress PaintControls PaintHandler PaintTo PaintWindow ParentDoubleBuffered ParentFormHandleInitialized ParentHandlesAllocated ParentWindow PerformTab ReAlign RealizeBounds RealizeBoundsRecursive ReloadDockedControl RemoveControl RemoveFocus Repaint ScaleBy ScaleControls ScrollBy ScrollBy_WS SelectFirst SelectNext SendDialogChar SendMoveSizeMessages SetBorderStyle SetBounds SetChildZPosition SetColor SetControlIndex SetDockManager SetFocus SetShape SetTempCursor ShowControl Showing UnlockRealizeBounds Update UpdateControlState UpdateDockCaption UpdateShowing UseDockManager UTF8KeyPress VisibleDockClientCount WindowHandle WMContextMenu WMDestroy WMEnter WMEraseBkgnd WMExit WMKeyDown WMKeyUp WMMove WMNotify WMPaint WMShowWindow WMSize WMSysChar WMSysKeyDown WMSysKeyUp WMWindowPosChanged WriteLayoutDebugReport WSSetText

From TControl (357)

AccessibleDescription AccessibleName AccessibleRole AccessibleValue Action ActionChange 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 AutoSizing AutoSizingAll AutoSizingLockCount BaseBounds BaseParentClientSize BeforeDestruction BeforeDragStart BeginAutoDrag BeginAutoSizing BeginDrag BiDiMode BorderSpacing BoundsChanged BoundsRect BoundsRectForNewParent BringToFront CalculateDockSizes CanAutoSize Caption CaptureChanged CaptureMouseButtons ChangeBounds Changed CheckChildClassAllowed CheckNewParent CheckOnChangeBounds Click ClientHeight ClientOrigin ClientRect ClientToParent ClientToScreen ClientWidth CMChanged CMCursorChanged CMHintShow CMHitTest CMMouseEnter CMMouseLeave CMParentBiDiModeChanged CMParentColorChanged CMParentFontChanged CMParentShowHintChanged CMSysFontChanged CMTextChanged CNPreferredSizeChanged Color ColorIsStored ConstrainedResize Constraints ControlFontClass ControlOrigin ControlState ControlStyle ControlToScreen CreateAccessibleObject CreateControlBorderSpacing CreateFloatingDockSite Cursor DblClick DefineProperties DesktopFont DisableAutoSizing DoAutoAdjustLayout DoBorderSpacingChange DoCallKeyEventHandler DoCallMouseWheelEventHandler DoCallNotifyHandler Dock Docked DockOrientation DockTrackNoTarget DoContextPopup DoDock DoEndDock DoEndDrag DoFixDesignFontPPI DoMouseDown DoMouseUp DoMouseWheel DoMouseWheelDown DoMouseWheelHorz DoMouseWheelLeft DoMouseWheelRight DoMouseWheelUp DoOnChangeBounds DoOnParentHandleDestruction DoOnResize DoOnShowHint DoScaleFontPPI DoStartDock DoStartDrag DragCanceled DragCursor DragDrop Dragging DragKind DragMode DragOver EnableAutoSizing Enabled EnabledChanged EnabledChanging EndAutoSizing EndDrag ExecuteCancelAction ExecuteDefaultAction FindSubComponent FixDesignFontsPPI Floating FloatingDockSiteClass Font ForeignAnchorSideChanged FormIsUpdating GetAccessibleObject GetAction GetActionLinkClass GetAnchorsDependingOnParent GetCachedText GetCanvasScaleFactor GetChildAccessibleObjectAtPos GetClientScrollOffset GetColorResolvingParent GetCursor GetDefaultColor GetDefaultDockCaption GetDefaultHeight GetDefaultWidth GetDockEdge GetDragImages GetEnabled GetFloating GetFloatingDockSiteClass GetLogicalClientRect GetMousePosFromMessage GetPalette GetParentBackground GetParentComponent GetPopupMenu GetPreferredSize GetRGBColorResolvingParent GetScrolledClientRect GetSelectedChildAccessibleObject GetSidePosition GetTextBuf GetTopParent HandleObjectShouldBeVisible HasHelp HasParent Height HeightIsAnchored HelpContext HelpKeyword HelpType Hide Hint HostDockSite InitiateAction InvalidateControl InvalidatePreferredSize IsAParentAligning IsBorderSpacingInnerBorderStored IsCaptionStored IsControl IsControlVisible IsEnabled IsParentColor IsParentFont IsParentOf IsProcessingPaintMsg IsRightToLeft IsVisible Left LMCaptureChanged LoadedAll LRDockWidth ManualDock ManualFloat MouseCapture MouseDown MouseEnter MouseInClient MouseLeave MouseMove Notification 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 ParentDestroyingHandle ParentFont ParentFontChanged ParentShowHint ParentToClient Perform PositionDockRect QuadClick ReadBounds ReadState Refresh RemoveHandler RemoveHandlerOnBeforeDestruction RemoveHandlerOnChangeBounds RemoveHandlerOnEnabledChanged RemoveHandlerOnEnabledChanging RemoveHandlerOnKeyDown RemoveHandlerOnMouseWheel RemoveHandlerOnResize RemoveHandlerOnVisibleChanged RemoveHandlerOnVisibleChanging ReplaceDockedControl RequestAlign Resize Scale96ToFont Scale96ToForm Scale96ToScreen ScaleConstraints ScaleDesignToForm ScaleFontsPPI ScaleFontTo96 ScaleFontToScreen ScaleFormTo96 ScaleFormToDesign ScaleScreenTo96 ScaleScreenToFont ScreenToClient ScreenToControl SendToBack SessionProperties SetAction SetAlign SetAnchors SetAutoSize SetBiDiMode SetBoundsKeepBase SetCursor SetDragMode SetEnabled SetHint SetInitialBounds SetName SetParent SetParentBackground SetParentBiDiMode SetParentComponent SetTextBuf SetVisible SetZOrder Show ShowHelp ShowHint TBDockHeight Top TripleClick UndockHeight UndockWidth UpdateAnchorRules UpdateBaseBounds UpdateMouseCursor UpdateRolesForForm UseRightToLeftAlignment UseRightToLeftReading UseRightToLeftScrollBar Visible VisibleChanged VisibleChanging Width WidthIsAnchored WindowProc WMCancelMode WMLButtonDBLCLK WMLButtonDown WMLButtonQuadCLK WMLButtonTripleCLK WMLButtonUp WMMButtonDBLCLK WMMButtonDown WMMButtonQuadCLK WMMButtonTripleCLK WMMButtonUp WMMouseHWheel WMMouseMove WMMouseWheel WMRButtonDBLCLK WMRButtonDown WMRButtonQuadCLK WMRButtonTripleCLK WMRButtonUp WMXButtonDBLCLK WMXButtonDown WMXButtonQuadCLK WMXButtonTripleCLK WMXButtonUp

From TLCLComponent (6)

DecLCLRefCount GetWSComponentClass IncLCLRefCount LCLRefCount NewInstance WidgetSetClass

From TComponent (64)

_AddRef _Release CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent 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 (35)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance 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.