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

# TCalculatorPanel.CreateLayout

Initializes and configures the calculator panel using the specified layout.

## Declaration

Source position: calcform.pas line 78

`public constructor TCalculatorPanel.CreateLayout(`
`AOwner: TComponent;`
`ALayout: TCalculatorLayout`
`);`

## Arguments

`AOwner` |  | Component which owns the class instance.
`ALayout` |  | Layout applied to the panel and its buttons.

## Description

CreateLayout is a constructor for the class instance. It calls the inherited Create constructor on entry, and sets the default values for properties.

AOwner is the component which owns the class instance (the TCalculatorForm instance).

ALayout specifies both the position and size for the buttons on the panel. It affects the Width and Height for the panel as well.

CreateLayout creates the calculator buttons and positions them on the panel for the specified layout. When clNormal is used in ALayout, buttons are created for Back, Clear, Ok and Cancel. clNormal also causes a panel used for Memory display to be created and positioned.

CreateLayout is called from the InitForm method in TCalculatorForm.

## See also

TCalculatorPanel.Memory |  | Contains the Double value stored as the memory for the calculator panel.
TCalculatorForm.InitForm |  | Initializes the calculator form using the specified layout.
TCalculatorLayout |  | Represents layouts used for panels on a TCalculatorForm instance.
TCustomPanel.Create |  | Constructor for the class instance.