Re:read/write a published property by name
Hello,
I have two components of the same type: let's take TButton.
Now at runtime I want to assign some of the published properties of Button1
the same values as Button2 has. (example: Button1.Left := Button2.Left;)
With typinfo I will get at runtime a list of the published properties names
of the Buttons as strings. Then the user can select which of these have to
be changed in Button1 to the values of Button2.
All the other properties should be left unchanged.
My problem more concrete:
----------------------------
Is there a way to read/write a published property at runtime, knowing only
that my component is of class TButton and the name of that property is
'Left'.
Something like:
tmp:=ReadProperty('Left', Button2);
WriteProperty('Left', Button1, tmp)
Thank you.