Vcl.Controls.TControl.IsControl

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property IsControl: Boolean read FIsControl write FIsControl;

C++

__property bool IsControl = {read=FIsControl, write=FIsControl, nodefault};

Properties

Type Visibility Source Unit Parent
property protected
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TControl

Description

Specifies whether a form stores its form-specific properties to a stream.

Use IsControl to use a form as a complex control, rather than as a desktop form. IsControl affects the way the form gets saved. When IsControl is true, form-specific properties do not get saved with the form. When IsControl is false, the form-specific properties get saved along with the other properties.

IsControl permits you to use the forms designer to create complex controls by creating those controls as forms, placing and naming their contained controls, and attaching code to events. After saving the form, edit the form as text, and in the text version set IsControl to true. The next time the form is loaded and saved, only those form properties appropriate to use as a control are stored, not the properties specific to TForm. Next, edit the form file as text, changing the type of the component from TForm to the desired control type, such as TPanel.

See Also