Board index » delphi » Accessing objects via their name as a string value
hannes
Delphi Developer
Accessing objects via their name as a string value
2003-09-03 05:09:45 PM delphi85
How do I get to an object when the name is available as a string?
eg I want to generate a name and then access the properties of that: LastSavedTag := (GeneratedName as TImage).Tag;
or something like:
LastSavedTag := (GetObject(GeneratedName) as TImage).Tag;
Finn Tolderlund
Delphi Developer
2003-09-03 05:50:04 PM
Re:Accessing objects via their name as a string value
Use the FindComponent function.
"hannes" <XXXX@XXXXX.COM>writes
Quote
How do I get to an object when the name is available as a string?
eg I want to generate a name and then access the properties of that:
LastSavedTag := (GeneratedName as TImage).Tag;
or something like:
LastSavedTag := (GetObject(GeneratedName) as TImage).Tag;