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

TCalculatorPanel.CalcKeyPress

Applies a key or button press to the calculator panel.

Declaration

Source position: calcform.pas line 79

public procedure TCalculatorPanel.CalcKeyPress(

  Sender: TObject;

  var Key: Char

);

Arguments

Sender

  

Object for the KeyPress event.

Key

  

Key value captured in the panel.

Description

CalcKeyPress is a method used to implement the OnKeyPress event handler for the TCalculatorForm instance where the panel is displayed.

Sender is the object instance (TCalculatorForm) for the event notification.

Key is the character value for the key (or button) for the notification. If Key is the caption for one of the buttons on the panel, its Click method is called. Otherwise, the private CalcKey method is called to apply the Key value.

CalcKeyPress is called by a TCalculatorForm instance when its OnKeyPress event handler is executed.

See also

TCalculatorPanel.OnCalcKey

  

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

TCalculatorForm.InitForm

  

Initializes the calculator form using the specified layout.

TForm.OnKeyPress

  

Event handler signalled for character data entered by the user.

TCustomSpeedButton.Click

  

Signals OnClick and/or executes the ActionLink when the control has been clicked.


Version 4.0 Generated 2025-05-03 Home