|
Emulated properties
Emulated properties are used for emulate the subproperties for the set-type properties. When the property type is set, the Boolean subproperty is added for each set element, for example, Font.Style has fsBold, fsItalic, fsUnderline and fsStrikeOut subproperties. When the property is emulated the Emulated property of Tproperty object is True. The emulated properties can be access as usual Boolean properties.
procedure TForm1.FormClick(Sender: TObject);
var
P: TProperty;
begin
with TPropertyList.Create(nil) do
try
Instance:=Self;
Root:=Self;
P:=FindProperty('Font.Style.fsBold');
if Assigned(P) then P.AsBoolean:=True;
finally
Free;
end;
end;
|