柳 柳枫 Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-07 #1 如何动态更改label.caption值我建了十个label,名称:label1--label10我想在一个循环中,随机更改label.caption值,关键如何取得label.name就可以了.
叶 叶不归 Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-07 #2 for i := 0 to componentcount-1 do if components is TLabel then memo1.lines.add(TLabel(components).name);
for i := 0 to componentcount-1 do if components is TLabel then memo1.lines.add(TLabel(components).name);
S smlabc Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-07 #3 for i := 1 to 10 do TLabel(FindComponent('Lable'+IntToStr(i))).Caption := 'NewName'+IntToStr(i);