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

CreateCalculatorForm

Creates, configures, and returns a new TCalculatorForm instance.

Declaration

Source position: calcform.pas line 137

function CreateCalculatorForm(

  AOwner: TComponent;

  ALayout: TCalculatorLayout;

  AHelpContext: THelpContext

):TCalculatorForm;

Arguments

AOwner

  

Owner for the new form instance.

ALayout

  

Layout for the calculator panel in the form instance.

AHelpContext

  

Help context for the newly created form instance in the return value.

Function result

Form instance created in the method.

Description

CreateCalculatorForm is a TCalculatorForm function used to create and configure a new calculator form instance using the arguments passed to the routine.

ALayout determines the number, type, position, and size for buttons on the calculator form. It is passed as argument to the TCalculatorForm.Create constructor used to instantiate the return value. See TCalculatorLayout for more information on the layout values.

AHelpContext contains the help context identifier assigned to the HelpContext property in the form instance.

CreateCalculatorForm ensures that the form instance is scaled to the PPI setting for the Screen, and updates Left and Top to center the form on the Screen display area. If an exception occurs during this operation the form instance is freed, and the return value is Nil. The exception is re-raised to perform exception handling enabled in the application.

CreateCalculatorForm is called from methods in TCalcEdit and TCalculatorDialog when the form instance is created for the controls.

See also

TCalculatorForm

  

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

TCalculatorLayout

  

Represents layouts used for panels on a TCalculatorForm instance.

TCalcEdit.RunDialog

  

RunDialog - perform the function of the dialog.

TCalculatorDialog.Execute

  

Creates, configures, and displays the form for the calculator dialog.


Version 3.2 Generated 2024-02-25 Home