Delphi – Getting property values with GetPropValue()


I’m using Delphi’s GetPropValue() function to get values ​​of certain properties of some objects of type TControl. Everything works correctly when I get simple property values ​​such as Value, Opacity, etc, but as I’m using firemonkey there are some extended properties, such as RotationCenter, it has RotationCenter.X and RotationCenter.Y, or even properties of text within TextSettings, in these properties with sub-types I can not get the values.

In this example I get the values ​​correctly:

If IsPublishedProp (Component_cc, ‘Value’) then
EditValue.Text: = GetPropValue (Component_cc, ‘Value’, true);

Where Component_cc:TControl; And is created dynamically, it can also be any type of Firemonkey component (so far everything is okay, everything works).

When I need to use the form below, it does not work.

If IsPublishedProp (Component_cc, ‘RotationCenter.X’) then
EditRotationCenterX.Text: = GetPropValue (CC_component, ‘RotationCenter.X’, true);

Does anyone know a way to get these properties extended by this function?

Comments are closed.