First, the CC_component property RotationCenteris actually an instance of a class TPositionthat deviates from TPersistent.
Secondly, you cannot use dotted notation when calling IsPublishedProp.
You can use GetObjectPropto first extract the internal instance TPosition, and then access the property X:
(Suppose a simple FMX application has one form containing TButton, called, Button1and a TEdit, called EditRotationCenterX.)
procedure TForm1.Button1Click(Sender: TObject);
var
CC_component : TComponent;
CC_component_RotationCenter : TPosition;
begin
CC_component := Button1;
if IsPublishedProp(CC_component, 'RotationCenter') then
begin
CC_component_RotationCenter := TPosition(GetObjectProp(CC_component, 'RotationCenter'));
EditRotationCenterX.Text := CC_component_RotationCenter.X.ToString;
end
end;
Update for a property of type Set:
Set type GetOrdProp. , , . , . , .
GetSetProp, Set Set. , Set [TCorner.BottonLeft, TCorner.TopRight], "TopRight, BottonLeft". , . , Delphi RTL FMX - .
( TRectangle, Rectangle1 TCheckBox, cbCornerBottonRight, FMX :)
procedure TForm1.Button1Click(Sender: TObject);
var
CC_component : TComponent;
CC_component_Corners : nativeint;
CC_component_CornersAsString : string;
begin
CC_component := Rectangle1;
if IsPublishedProp(CC_component, 'Corners') then
begin
CC_component_Corners := GetOrdProp(CC_component,'Corners');
cbCornerBottonRight.IsChecked := ((1 shl ord(TCorner.BottomRight)) and CC_component_Corners) <> 0;
CC_component_CornersAsString := GetSetProp(CC_component,'Corners');
cbCornerBottonRight.IsChecked := CC_component_CornersAsString.IndexOf('BottomRight') >= 0;
end;
end;