Indexed Objects in VCL

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
oppofix
Posts: 5
Joined: Tue 20 May 2008 12:56

Indexed Objects in VCL

Post by oppofix » Thu 12 Jun 2008 06:36

Hi,
i need to reply many labels and panels inside a form,
and i'd like to know if it's possible index them,
(like in Visual Basic, for example).

In this way, i could call

label[1].caption:= '...';
label[2].caption:= '...';

instead of creating label1, label2, ...

Is it possible?

Thank for any aid.

Fabrizio De Pietri.

MarkF
Posts: 211
Joined: Thu 02 Mar 2006 14:55

Post by MarkF » Thu 12 Jun 2008 11:52

Hi Fabrizio,

There's a number of different ways to do this depending on why you are trying to do it and what you are trying to achieve. Take a look at:

http://www.mhn.org/~graham/delphi.html#I6.6

Or google on "delphi control array like vb" on Google's web and also the groups section.

Note that your question doesn't really relate to ODAC at all, so you should probably post these kinds of questions in the Delphi public forums. Good luck!

-Mark

Post Reply