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

TCalculatorPanel

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

Implements a panel used for buttons and the value display in a calculator form.

Declaration

Source position: calcform.pas line 45

type TCalculatorPanel = class(TPanel)

protected

  procedure ErrorBeep;

  

Produces an error tone when enabled using the BeepOnError property.

  procedure TextChange; virtual;

  

Sets the display text for the calculator panel and signals OnTextChange.

  class procedure WSRegisterClass; override;

public

  constructor CreateLayout();

  

Initializes and configures the calculator panel using the specified layout.

  procedure CalcKeyPress();

  

Applies a key or button press to the calculator panel.

  procedure Copy;

  

Loads the value in Text into the Clipboard as plain text.

  procedure Paste;

  

Pastes text from the Clipboard into the text display for the calculator panel.

  function WorkingPrecision;

  

Gets the minimum number of precision digits allowed for the DisplayValue on the panel.

  procedure UpdateMemoryLabel;

  

Updates the Memory indicator to reflect a non-zero value present in the Memory property.

  property DisplayValue: Double; [rw]

  

Contains the Double value representing the result (and Text) displayed on the calculator panel.

  property Memory: Double; [rw]

  

Contains the Double value stored as the memory for the calculator panel.

  property Precision: Byte; [rw]

  

Number of digits used after the decimal for the Double value in the calculator panel.

  property BeepOnError: Boolean; [rw]

  

Indicates whether a beep occurs when an error condition is detected in the calculator panel.

  property Status: TCalculatorState; [rw]

  

Contains the status or state for the calculator panel.

  property OperatorChar: Char; [rw]

  

Character representing the last operator entered using the calculator panel.

  property Text: string; [r]

  

Text representation for the Double display value on the calculator panel.

  property OnOkClick: TNotifyEvent; [rw]

  

Event handler signalled when the OK button on the calculator panel has been clicked.

  property OnCancelClick: TNotifyEvent; [rw]

  

Event handler signalled when the Cancel button on the calculator form has been clicked, or the form is closed using the Close window decoration or an accelerator key.

  property OnResultClick: TNotifyEvent; [rw]

  

Event handler signalled when the Enter key, = or % operators are clicked on the panel.

  property OnError: TNotifyEvent; [rw]

  

Event handler signalled when the Error method is called for the calculator panel.

  property OnTextChange: TNotifyEvent; [rw]

  

Event handler signalled when a new value has been assigned to the Text for the panel.

  property OnCalcKey: TKeyPressEvent; [rw]

  

Event handler signalled when a key press is applied to the calculator panel.

  property OnDisplayChange: TNotifyEvent; [rw]

  

Event handler signalled following a change to the DisplayValue for the calculator panel.

  property Color: TColor;

  

Background color for the calculator panel.

end;

Inheritance

TCalculatorPanel

  

Implements a panel used for buttons and the value display in a calculator form.

|

TPanel

  

Implements a general purpose container which can hold other components.

|

TCustomPanel

  

The base class for a general container which can hold other objects. It has a customizable border and a central text.

|

TCustomControl

  

The base class for windowed controls which paint themselves.

|

TWinControl

  

Implements a windowed control which can contain other child controls.

|

TControl

  

The base class for visible controls.

|

TLCLComponent

  

The base class for LCL components which have an associated widget.

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent,IFPObserved

|

TObject


Version 3.2 Generated 2024-02-25 Home