Name

$DesignOnly Compiler Directive

Syntax

{$DesignOnly Off} // default
{$DesignOnly On}

Scope

Project

Description

Use the $DesignOnly directive in a package’s .dpk file to mark the package as being a design-time package. You cannot link the package with an application or library. You can only install the package in the IDE of Delphi or C++ Builder.

When you write a component, put the component’s unit in a runtime package, and put the property and component editors in a design-time package. That way, an application can link with the component’s runtime package and avoid the overhead of linking the design-time code, which the application doesn’t need.

See Also

Package Directive, $RunOnly Compiler Directive

Get Delphi in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.