I haven't used RTTI that much, but here are two suggestions:

1) Try GetPropValue(Control.Pen, PropertyName);

2) Call GetPropList to get a list of properties and examine what is returned

HTH...

At 04:28 AM 4/22/2014, John Barrat wrote:
I am using GetPropValue get the properties of a control.

e.g. PropValue := GetPropValue(Control, PropertyName);

This works fine for simple properties such as color, Caption, width etc.
However, it does not work if the property is a record.

e.g TPen Has 2 elements, Width and Color.

If I just use Width it returns the control's width.  If I use Pen.Width it
errors with "Property Pen.Width does not exist"

Similarly, if I use Color it returns the control's color, if I use Pen.Color
I get the same error message.

What do I need to do to access these properties?

The control in question is a TShape but I am guessing this would apply to
any control using a TPen.



John Barrat















_______________________________________________
Delphi mailing list
[email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

_______________________________________________
Delphi mailing list
[email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to