Hi everyone, I'm making a language manager component, something like Delphi's TSilLang and I'm facing a problem.
I use FindComponent to find components, but this functions returns TComponent type. The problem is when I need to assign a property, for instance Caption property, because TComponent type hasn't Caption property.
Let's assume a label called lblTitle. If I search this label using FindComponent function, I can reach to it, but once I've reached it I can't not access its properties because FindComponent giveme a TComponent object.
Of course I can solve this casting in this way: TLabel(Comp).Caption := '?????'; but this is not right because I don't know if the result of FindComponent is a TLabel object.
I can use SetPropValue but not always, because its not working on every property, for example Memo.Lines.Text
I store languages in an ini file, something like this:
[frmMain]
lblTitle.Caption=This is the Title
btnExit.Caption=Exit
btnExit.Hint=Terminate the app
...
I hope I was clear enough.
Thanks in advance.