I'm using Delphi 5, and we have a method to dynamically create certain controls based on the contents of a database table (we create TButtons mostly) and take action when those are clicked. This allows us to add simple controls to a form without having to recompile the application.
I was wondering if it was possible to set a component's property based on a property name contained in a string so we could set further options.
Pseudo-code:
Comp := TButton.Create(Self);
// Something like this:
Comp.GetProperty('Left').AsInteger := 100;
// Or this:
Comp.SetProperty('Left', 100);
Is this possible at all?