Sign in Join
FPDoc Onlineexperiment

TCalculatorForm class

In unit CalcForm

Implements the form used to display a calculator for a TCalculatorDialog instance.

Declaration

pascal
TCalculatorForm = class(TForm)

Inheritance

  1. TCalculatorForm
  2. TForm
  3. TCustomForm
  4. TCustomDesignControl
  5. TScrollingWinControl
  6. TCustomControl
  7. TWinControl
  8. TControl
  9. TLCLComponent
  10. TComponent
  11. TPersistent
  12. TObject

Description

TCalculatorForm is a TForm descendant which implements the form used to display a calculator. It extends the ancestor class with properties, methods, and events needed to configure and display the form instance with UI elements needed for either a simple (compact) or a normal calculator layout. Use the Create constructor to control the layout for the calculator form instance.

Use the Value property to set or get the value displayed on the calculator.

Use the OnCalcKey and OnDisplayChange event handlers to perform actions needed when keys are pressed or the display value is changed on the form instance.

See also

Properties

ValuepublicValue displayed or returned from the calculator.
MainPanelpublicTPanel instance used as a container for the display and button panels on the calculator form.
CalcPanelpublicPanel with the calculator keys, operators,memory buttons, et. al.
DisplayPanelpublicPanel for the display area on the calculator form.
DisplayLabelpublicLabel used to display the value in the panel.

Methods

WSRegisterClassprotectedCreates an association between the class type and its widgetset class.
OkClickprotectedPerforms actions needed when the OK button is clicked.
CancelClickprotectedPerforms actions needed when the Cancel button is clicked.
CalcKeyprotectedPerforms actions needed for a key received in the calculator form.
DisplayChangeprotectedPerforms actions needed when the calculator display is changed.
InitFormprotectedInitializes the calculator form using the specified layout.
CreatepublicConstructor for the class instance.

Events

OnCalcKeypublicEvent handler signalled to handle keys press on the calculator form.
OnDisplayChangepublicEvent handler signalled when the calculator display has been changed.

Inherited

From TForm (104)

Action ActiveControl Align AllowDropFiles AlphaBlend AlphaBlendValue Anchors ArrangeIcons AutoScroll AutoSize BiDiMode BorderIcons BorderStyle BorderWidth Caption Cascade ChildSizing ClientHandle ClientHeight ClientWidth Color Constraints CreateWnd DefaultMonitor DesignTimePPI DockManager DockSite DoubleBuffered DragKind DragMode Enabled Font FormStyle HelpFile Icon KeyPreview LCLVersion Loaded Menu Next OnActivate OnChangeBounds OnClick OnClose OnCloseQuery OnConstrainedResize OnContextPopup OnCreate OnDblClick OnDeactivate OnDestroy OnDockDrop OnDockOver OnDragDrop OnDragOver OnDropFiles OnEndDock OnGetSiteInfo OnHelp OnHide OnKeyDown OnKeyPress OnKeyUp OnMouseDown OnMouseEnter OnMouseLeave OnMouseMove OnMouseUp OnMouseWheel OnMouseWheelDown OnMouseWheelHorz OnMouseWheelLeft OnMouseWheelRight OnMouseWheelUp OnPaint OnResize OnShortCut OnShow OnShowHint OnStartDock OnUnDock OnUTF8KeyPress OnWindowStateChange ParentBiDiMode ParentDoubleBuffered ParentFont PixelsPerInch PopupMenu PopupMode PopupParent Position Previous Scaled ScreenSnap SessionProperties ShowHint ShowInTaskBar SnapBuffer SnapOptions Tile TileMode UseDockManager Visible WindowState

From TCustomForm (135)

Activate Active ActiveChanged ActiveDefaultControl ActiveMDIChild AddHandlerClose AddHandlerCreate AddHandlerFirstShow AdjustClientRect AfterConstruction AllAutoSized AutoScale AutoSizeDelayedHandle BeforeDestruction BeginAutoDrag BeginFormUpdate BigIconHandle CalculatePreferredSize CancelControl CanFocus ChildHandlesCreated Close CloseQuery CMActionExecute CMActionUpdate CMActivate CMAppShowBtnGlyphChanged CMAppShowMenuGlyphChanged CMBiDiModeChanged CMDeactivate CMIconChanged CMParentBiDiModeChanged CMRelease CMShowingChanged ColorIsStored ConstrainedResize CreateNew CreateParams Deactivate DefaultControl DefocusControl Designer Destroy DestroyWnd DoAddActionList DoAutoSize Dock DoClose DoCreate DoDestroy DoDock DoExecuteAction DoFirstShow DoHide DoOnChangeBounds DoOnResize DoRemoveActionList DoShow DoShowWindow DoUpdateAction EffectiveShowInTaskBar EndFormUpdate EnsureVisible FocusControl FormIsUpdating FormState GetChildren GetControlClassDefaultSize GetDefaultDockCaption GetFloating GetFormImage GetMDIChildren GetPreferredSize GetRealPopupParent GetRolesForControl HandleCreateException HandleDestroyException HandleShowHideException Hide InitializeWnd IntfDropFiles IntfHelp IsShortcut LastActiveControl MakeFullyVisible MDIChildCount MDIChildren ModalResult Monitor MoveToDefaultPosition Notification OnShowModalFinished PaintWindow ProcessResource Release RemoveAllHandlersOfObject RemoveHandlerClose RemoveHandlerCreate RemoveHandlerFirstShow RequestAlign Resizing RestoredHeight RestoredLeft RestoredTop RestoredWidth SetAutoScroll SetAutoSize SetFocus SetFocusedControl SetParent SetRestoredBounds SetScaled SetVisible SetZOrder Show ShowModal ShowOnTop SmallIconHandle UpdateActions UpdateDockCaption UpdateShowing UpdateWindowState VisibleChanged VisibleChanging VisibleIsStored WantChildKey WMActivate WMCloseQuery WMDPIChanged WMHelp WMShowWindow WMSize WMWindowPosChanged WMWindowPosChanging WndProc

From TCustomDesignControl (2)

AutoAdjustLayout DoAutoAdjustLayout

From TScrollingWinControl (16)

AlignControls AutoScrollEnabled CalculateAutoRanges ClientToScreen ComputeScrollbars GetClientScrollOffset GetLogicalClientRect GetPreferredSizeClientFrame HorzScrollBar ScreenToClient ScrollBy ScrollInView UpdateScrollbars VertScrollBar WMHScroll WMVScroll

From TCustomControl (5)

Canvas FontChanged Paint SetColor WMPaint

From TWinControl (197)

AddControl AutoSizeDelayed AutoSizeDelayedReport AutoSizePhases BeginUpdateBounds BoundsLockCount BroadCast Brush BrushCreated CachedClientHeight CachedClientWidth CanSetFocus CanTab ChangeScale ChildClassAllowed ChildKey ClientRectNeedsInterfaceUpdate CMBorderChanged CMDoubleBufferedChanged CMEnabledChanged CMEnter CMExit CMParentDoubleBufferedChanged CMShowHintChanged CMVisibleChanged CNChar CNKeyDown CNKeyUp CNSysKeyDown CNSysKeyUp ContainsControl ControlAtPos ControlCount ControlKeyDown ControlKeyUp Controls ControlsAligned CreateBrush CreateDockManager CreateHandle CreateParented CreateParentedControl CreateSubClass CustomAlignInsertBefore CustomAlignPosition DefaultHandler DefWndProc DesignerDeleting DestroyHandle DialogChar DisableAlign DoAddDockClient DoAdjustClientRectChange DoAlignChildControls DoAllAutoSize DoChildSizingChange DockClientCount DockClients DockDrop DockOver DoConstraintsChange DoDockClientMsg DoDockOver DoDragMsg DoEnter DoExit DoFlipChildren DoFloatMsg DoGetDockCaption DoKeyDownBeforeInterface DoKeyPress DoKeyUpBeforeInterface DoRemainingKeyDown DoRemainingKeyUp DoRemoveDockClient DoSendBoundsToInterface DoSendShowHideToInterface DoSetBounds DoUnDock DoUndockClientMsg DoUTF8KeyPress EnableAlign EndUpdateBounds EraseBackground FinalizeWnd FindChildControl FindNextControl FixDesignFontsPPIWithChildren FixupTabList FlipChildren Focused FormEndUpdated GetAdjustedLogicalClientRect GetBorderStyle GetChildrenRect GetClientOrigin GetClientRect GetControlIndex GetControlOrigin GetDeviceContext GetDockCaption GetEnumeratorControls GetEnumeratorControlsReverse GetMouseCapture GetParentHandle GetSiteInfo GetTabOrderList GetTextLen GetTopParentHandle Handle HandleAllocated HandleNeeded InsertControl IntfGetDropFilesTarget IntfUTF8KeyPress Invalidate InvalidateBoundsRealized InvalidateClientRectCache InvalidatePreferredChildSizes IsClientHeightStored IsClientWidthStored IsControlMouseMsg IsFlipped IsResizing IsSpecialSubControl KeyDown KeyDownAfterInterface KeyDownBeforeInterface KeyPress KeyUp KeyUpAfterInterface KeyUpBeforeInterface LockRealizeBounds MainWndProc NotifyControls OnAlignInsertBefore OnAlignPosition OnEnter OnExit OnGetDockCaption PaintControls PaintHandler PaintTo ParentFormHandleInitialized ParentHandlesAllocated ParentWindow PerformTab RealGetText ReAlign RealizeBounds RealizeBoundsRecursive RealSetText ReloadDockedControl RemoveControl RemoveFocus Repaint ScaleBy ScaleControls ScrollBy_WS SelectFirst SelectNext SendDialogChar SendMoveSizeMessages SetBorderStyle SetBounds SetChildZPosition SetControlIndex SetDockManager SetShape SetTempCursor ShowControl Showing TabOrder TabStop UnlockRealizeBounds Update UpdateControlState UTF8KeyPress VisibleDockClientCount WindowHandle WMChar WMContextMenu WMDestroy WMEnter WMEraseBkgnd WMExit WMKeyDown WMKeyUp WMKillFocus WMMove WMNotify WMSetFocus WMSysChar WMSysKeyDown WMSysKeyUp WriteLayoutDebugReport WSSetText

From TControl (295)

AccessibleDescription AccessibleName AccessibleRole AccessibleValue ActionChange ActionLink ActiveDefaultControlChanged AddHandler AddHandlerOnBeforeDestruction AddHandlerOnChangeBounds AddHandlerOnEnabledChanged AddHandlerOnEnabledChanging AddHandlerOnKeyDown AddHandlerOnMouseWheel AddHandlerOnResize AddHandlerOnVisibleChanged AddHandlerOnVisibleChanging AdjustSize AnchorAsAlign AnchorClient AnchoredControlCount AnchoredControls AnchorHorizontalCenterTo AnchorParallel AnchorSame AnchorSide AnchorSideBottom AnchorSideChanged AnchorSideLeft AnchorSideRight AnchorSideTop AnchorToCompanion AnchorToNeighbour AnchorVerticalCenterTo AssignTo AutoSizing AutoSizingAll AutoSizingLockCount BaseBounds BaseParentClientSize BeforeDragStart BeginAutoSizing BeginDrag BorderSpacing BoundsChanged BoundsRect BoundsRectForNewParent BringToFront CalculateDockSizes CanAutoSize CaptureChanged CaptureMouseButtons ChangeBounds Changed CheckChildClassAllowed CheckNewParent CheckOnChangeBounds Click ClientOrigin ClientRect ClientToParent CMChanged CMCursorChanged CMHintShow CMHitTest CMMouseEnter CMMouseLeave CMParentColorChanged CMParentFontChanged CMParentShowHintChanged CMSysFontChanged CMTextChanged CNPreferredSizeChanged ControlFontClass ControlOrigin ControlState ControlStyle ControlToScreen CreateAccessibleObject CreateControlBorderSpacing CreateFloatingDockSite Cursor DblClick DefineProperties DesktopFont DisableAutoSizing DoBorderSpacingChange DoCallKeyEventHandler DoCallMouseWheelEventHandler DoCallNotifyHandler Docked DockOrientation DockTrackNoTarget DoContextPopup DoEndDock DoEndDrag DoFixDesignFontPPI DoMouseDown DoMouseUp DoMouseWheel DoMouseWheelDown DoMouseWheelHorz DoMouseWheelLeft DoMouseWheelRight DoMouseWheelUp DoOnParentHandleDestruction DoOnShowHint DoScaleFontPPI DoStartDock DoStartDrag DragCanceled DragCursor DragDrop Dragging DragOver EditingDone EnableAutoSizing EnabledChanged EnabledChanging EndAutoSizing EndDrag ExecuteCancelAction ExecuteDefaultAction FindSubComponent FixDesignFontsPPI Floating FloatingDockSiteClass ForeignAnchorSideChanged GetAccessibleObject GetAction GetActionLinkClass GetAnchorsDependingOnParent GetCachedText GetCanvasScaleFactor GetChildAccessibleObjectAtPos GetColorResolvingParent GetCursor GetDefaultColor GetDefaultHeight GetDefaultWidth GetDockEdge GetDragImages GetEnabled GetFloatingDockSiteClass GetMousePosFromMessage GetPalette GetParentBackground GetParentComponent GetPopupMenu GetRGBColorResolvingParent GetScrolledClientRect GetSelectedChildAccessibleObject GetSidePosition GetTextBuf GetTopParent HandleObjectShouldBeVisible HasHelp HasParent Height HeightIsAnchored HelpContext HelpKeyword HelpType 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 MouseUp OnEditingDone OnEndDrag OnQuadClick OnStartDrag OnTripleClick Parent ParentBackground ParentColor ParentDestroyingHandle ParentFontChanged ParentShowHint ParentToClient Perform PositionDockRect QuadClick ReadBounds ReadState Refresh RemoveHandler RemoveHandlerOnBeforeDestruction RemoveHandlerOnChangeBounds RemoveHandlerOnEnabledChanged RemoveHandlerOnEnabledChanging RemoveHandlerOnKeyDown RemoveHandlerOnMouseWheel RemoveHandlerOnResize RemoveHandlerOnVisibleChanged RemoveHandlerOnVisibleChanging ReplaceDockedControl Resize Scale96ToFont Scale96ToForm Scale96ToScreen ScaleConstraints ScaleDesignToForm ScaleFontsPPI ScaleFontTo96 ScaleFontToScreen ScaleFormTo96 ScaleFormToDesign ScaleScreenTo96 ScaleScreenToFont ScreenToControl SendToBack SetAction SetAlign SetAnchors SetBiDiMode SetBoundsKeepBase SetCursor SetDragMode SetEnabled SetHint SetInitialBounds SetName SetParentBackground SetParentBiDiMode SetParentComponent SetTextBuf ShouldAutoAdjust ShowHelp TBDockHeight Text TextChanged Top TripleClick UndockHeight UndockWidth UpdateAnchorRules UpdateBaseBounds UpdateMouseCursor UpdateRolesForForm UseRightToLeftAlignment UseRightToLeftReading UseRightToLeftScrollBar 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 (34)

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.