delphi - Delphi中存储的关键字

标签 delphi

Delphi 允许在定义属性时使用存储的关键字,如下所示:

property Fields: TIndexDefs read FFields write SetFields stored FieldsStored;

关键字的目的是什么以及它的作用是什么?

最佳答案

来 self 的 Delphi 7 帮助文件:

The optional stored, default, and nodefault directives are called storage specifiers. They have no effect on program behavior, but control whether or not to save the values of published properties in form files.

The stored directive must be followed by True, False, the name of a Boolean field, or the name of a parameterless method that returns a Boolean value. For example,

property Name: TComponentName read FName write SetName stored False;

If a property has no stored directive, it is treated as if stored True were specified.

它控制是否在表单的 .DFM 文件中存储与组件相关的属性。

关于delphi - Delphi中存储的关键字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2072096/

相关文章:

delphi - Delphi Parallel.For 是否有 MaxParallism

delphi - 如何在Delphi中的Units初始化部分捕获异常

delphi - 解决 Delphi 中的循环引用

Delphi - 智能指针和泛型 TList

Delphi - 带有activeX控件的应用程序导致 "appcrash"

delphi - 是否可以使用Delphi XE2开发Windows CE应用程序?

windows - Delphi:系统菜单打开了吗?

delphi - 如何通过Delphi 7窥视STDIN?

delphi - Delphi 中通用持有记录的等于运算符

windows - 应用程序由用户或其他应用程序启动?