Alexandre Leclerc wrote:
It is [control-type/category][control-name] based. I also found that
making automatic stuff is also clean... simple example I did once for
other reasons (I write the code from memory, might not compile):
for i := 0 to ControlCount-1 do
 if Copy(Controls[i].Name, 1, 3) = 'lbl' then
   (Controls[i] as TLabel).Caption := 'Label control' + IntToStr(i);


I would write that as
for i := 0 to ControlCount-1 do
  if Controls[i] is TLabel then
    TLabel(Controls[i]).Caption := 'Label control' + IntToStr(i);

Vincent

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to