csDesignInstance
csDesignInstance = 10
Example
function IsDesignerRoot(const State: TComponentState): Boolean;
begin
Result := (csDesignInstance in State) and (csDesigning in State);
end;
Usage
csDesignInstance marks the root component instance currently represented by a designer, normally together with csDesigning.
Additional Technical Info
csDesignInstance is member ordinal 10 and the last current member of the component-state element enumeration used by TComponentState. It identifies the root object represented by a designer and appears with csDesigning in normal framework use.
It does not mean the component is the root of a Velox execution flow, module tree, dataset hierarchy or ownership graph. It carries no object reference and grants no modification authority.
The read-only flag is a transient design-framework detail. Check membership by name and avoid persisting its ordinal/bit because enum extension could change a serialized numeric contract. The example is source-reviewed only.
External references
- Embarcadero TComponentState - design-instance definition.
- Free Pascal TComponentState - compatible component-state context.