[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'EditBtn' (#lcl)

# TCalcEdit

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TCalcEdit - an EditBox to hold a numeric value, with an attached SpeedButton that will summon a calculator dialog

## Declaration

Source position: editbtn.pas line 420

`type TCalcEdit = class(TCustomEditButton)`
`protected`
`FCalcDialog: TForm;` |  | FCalcDialog - local variable holding the Calculator Dialog for use with this class
`function GetDefaultGlyph; override;` |  | GetDefaultGlyph - find the default glyph for the SpeedButton
`function GetDefaultGlyphName; override;` |  | GetDefaultGlyphName - find the name for the default glyph for the SpeedButton
`procedure DoButtonClick(); override;` |  | DoButtonClick - software emulation of the OnButtonClick event
`procedure RunDialog; virtual;` |  | RunDialog - perform the function of the dialog
`public`
`constructor Create(); override;` |  | Create - constructor for TCustomEditButton: calls inherited Create then sets some defaults and initialises some variables
`published`
`property CalculatorLayout: TCalculatorLayout; [rw]` |  | CalculatorLayout - normal or simple
`property AsFloat: Double; [rw]` |  | AsFloat - holds the result of the calculation as a floating-point (double precision) number
`property AsInteger: Integer; [rw]` |  | AsInteger - holds the result of the calculation as an Integer
`property OnAcceptValue: TAcceptValueEvent; [rw]` |  | OnAcceptValue - event handler for accepting the result of the calculation
`property DialogTitle: String; [rws]` |  | DialogTitle - the caption to be used for the dialog
`property ButtonWidth;` |  | ButtonWidth - the width of the SpeedButton attached to the Edit Box
`property DirectInput;` |  | DirectInput - if True, direct data input to the Edit Box is permitted
`property ButtonOnlyWhenFocused;` |  | ButtonOnlyWhenFocused - if True, the SpeedButton only appears when focus is given to the EditButton control
`property NumGlyphs;` |  | NumGlyphs - the number of available glyphs
`property Flat;` |  | Flat - if True, SpeedButton appears flat rather than three-dimensional
`property Align;` |  | Used to align the control to the top, bottom, left or right of its client.
`property Anchors;` |  | The set of anchor definitions for this control
`property BorderSpacing;` |  | Determines the border spacing for this control
`property BorderStyle;`
`property AutoSize;` |  | Whether auto-size is to be used
`property AutoSelect;` |  | AutoSelect : if True, the edit control will select all its text when it receives focus or when the Enter key is pressed.
`property Color;` |  | Determine the colour for the current control
`property DragCursor;` |  | DragCursor - the style of cursor to be used during the Drag process
`property DragMode;` |  | DragMode - whether manual or automatic
`property Enabled;` |  | Whether the control is Enabled (read/write). If not, it usually appears 'greyed-out'
`property Font;` |  | The font to be used for text in this control (read/write).
`property MaxLength;` |  | MaxLength: maximum length allowed for text string
`property ParentColor;` |  | ParentColor - should the control have the same colour as the parent? Default is true
`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
`property ReadOnly;` |  | ReadOnly - the contents of the edit box may only be read, not written or erased
`property ShowHint;` |  | Flag to determine: Is hint to be displayed for this control?
`property TabOrder;` |  | The place this control occupies in the list of tabs
`property TabStop;` |  | Is the control in the sequence of controls accessed by successive presses of the Tab key?
`property Visible;` |  | Visible - can the control be seen?
`property OnChange;` |  | OnChange - event handler for any change in text
`property OnClick;` |  | Event Handler for mouse click
`property OnDblClick;` |  | Event Handle for mouse double-click
`property OnDragDrop;` |  | Event handler for the drop of a control onto this control.
`property OnDragOver;` |  | Event handler for the case when a control is dragged over another control
`property OnEditingDone;` |  | Event handler when editing is done
`property OnEndDrag;` |  | Event handler for the end of a dragging process
`property OnEnter;` |  | OnEnter - event handler for when the mouse enters the control, and the control receives focus
`property OnExit;` |  | OnExit - event handler for when the mouse leaves the control and it loses focus
`property OnKeyDown;` |  | OnKeyDown - event handler for instance when key is down while control has focus
`property OnKeyPress;` |  | OnKeyPress - event controller for a key being pressed while the control has focus. To properly handle national chars use UTF8KeyPress instead.
`property OnKeyUp;` |  | OnKeyUp - event handler for instance when a key is up (not pressed) while the control has focus
`property OnMouseDown;` |  | Event handler for when a mouse button is pressed down
`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 OnStartDrag;` |  | Event handler for start of dragging operation
`property OnUTF8KeyPress;` |  | UTF8KeyPress - event controller for a key being pressed while the control has focus.
`end;`

## Inheritance

`TCalcEdit` |  | TCalcEdit - an EditBox to hold a numeric value, with an attached SpeedButton that will summon a calculator dialog
`TCustomEditButton` |  | TCustomEditButton - base class for TEditButton, an Edit Box with attached Speed Button
`TCustomMaskEdit` |  | TCustomMaskEdit - base class for TMaskEdit, an Edit box with characters masked out to avoid unauthorised reading
`TCustomEdit` |  | TCustomEdit : the base type from which the TEdit Box is derived.
`TWinControl`
`TControl`
`TLCLComponent` |  | TLCLComponent - base class for LCL components
`TComponent,IUnknown,IInterfaceComponentReference`
`TPersistent`
`TObject`

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