Dynamically referencing components through an incrementing variable
Posted on 1998-10-23
With one of my Delphi programs, I have many components named 'last1'...'last26' and 'new1'...'new26' all on a single form. I would like to reference each of these objects through an incrementing variable. EG: if the incrementing variable was called x, I would like to do something of the following:
while x < 27 do
form1.last(x).caption := ('Last', + x);
x := x + 1;
Where x is repeatedly incremented until it reaches the value of 26 etc...
Is this possible in Delphi?