Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Delphi 组件初始化-运行时与设计时_Delphi_Custom Component - Fatal编程技术网

Delphi 组件初始化-运行时与设计时

Delphi 组件初始化-运行时与设计时,delphi,custom-component,Delphi,Custom Component,我正在构建一系列可视复合组件,它们使用类似/常见的“连接”方法,在那里触发内部表等 我正在自动连接一些东西,以便在运行时自动连接。如何在组件级别判断当前状态是运行时还是设计时?我想您需要检查组件的组件状态属性中是否存在csDesigning标志: if csDesigning in ComponentState then // designtime else // not designtime

我正在构建一系列可视复合组件,它们使用类似/常见的“连接”方法,在那里触发内部表等


我正在自动连接一些东西,以便在运行时自动连接。如何在组件级别判断当前状态是运行时还是设计时?

我想您需要检查组件的
组件状态
属性中是否存在
csDesigning
标志:

if csDesigning in ComponentState then
  // designtime
else
  // not designtime