CreateCalculatorForm function
Creates, configures, and returns a new TCalculatorForm instance.
Declaration
function CreateCalculatorForm(AOwner: TComponent;
ALayout: TCalculatorLayout;
AHelpContext: THelpContext)
: TCalculatorFormArguments
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
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
