Unit 'Forms' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#lcl]

TCustomFrame

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

The base type for TFrame.

Declaration

Source position: forms.pp line 293

type TCustomFrame = class(TCustomDesignControl)

protected

  class procedure WSRegisterClass; override;

  

Registers this component class with the current WidgetSet.

  procedure Notification(); override;

  

Adds or removes an action list for the control.

  procedure SetColor(); override;

  

Sets the value for the Color property.

  procedure SetParent(); override;

  

Sets the value for the Parent property.

  procedure SetParentBackground(); override;

  

Sets the value for the ParentBackground property.

  procedure CMParentColorChanged(); message;

  

Handles the CM_PARENTCOLORCHANGED message for the control.

  procedure DefineProperties(); override;

  

Defines non-published properties that are included in LCL component streaming.

  procedure CalculatePreferredSize(); override;

  

Gets the preferred height and width for the control used during auto-sizing.

  procedure UpdateOpaque;

  

Updates control style flags to reflect the transparency for the frame.

public

  constructor Create(); override;

  

Constructor for the class instance.

  procedure GetChildren(); override;

  

Invokes Proc for all Controls and also for all Components without a Parent.

  class function GetControlClassDefaultSize; override;

  

Gets the default dimensions for a new instance of the class.

  property ParentBackground: Boolean;

  

Indicates if the control uses the background from the parent.

end;

Inheritance

TCustomFrame

  

The base type for TFrame.

|

TCustomDesignControl

  

Provides a designer surface for scaling and layout of its child controls.

|

TScrollingWinControl

  

Class of a windowed control with incorporated scroll bars.

|

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.

|

TObject

Description

TCustomFrame is a TCustomDesignControl descendant which implements the base class for TFrame. A Frame is a named container for related components. Groups of controls can be place on a frame, and re-used in your applications.

A Frame has behavior very similar to a Form. Their unique ability is that they can be embedded into forms or other frames in the designer. Like forms, they are stored in two separate files: the code is stored in a .pas unit file, and the design is stored in a .lfm file.

Frames can be created and designed in the Lazarus IDE by creating a new Frame module, and using the unit in your application. An existing frame can be added using the TFrame component on the Standard tab in the Lazarus IDE; you will be prompted for the TFrame class to use for the component.

Frames can also be created entirely in code at run-time. They do not have to be installed in the Lazarus IDE. One drawback is that complex inheritance hierarchies for TFrame classes can be problematic; they do not propagate changes to all derived frames in a multi-level inheritance tree.

See also

TFrame

  

Frames can be designed like Forms and used like custom controls, without much coding or installation in the IDE.

TCustomDesignControl

  

Provides a designer surface for scaling and layout of its child controls.