Link to home
Start Free TrialLog in
Avatar of ChrisBerry
ChrisBerryFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Addressing controls who's name is in a variable

How can I address the properties of a control whose name I have in a variable?

I have tried something like this:-

TControl(ControlName).Property := xxxx;

While compiles happily I get an address error on run. I realsie I am apparently typecasting the ControlName variable to TControl and this is probably the cause of the error but I can't see the way to solve the problem.

Thanks

Chris
ASKER CERTIFIED SOLUTION
Avatar of rene100
rene100

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ChrisBerry

ASKER

Thank you, I had implemented a find component using the component list of the form but I thought there must be a better way.