想点击一下button把屏幕上用panel画的一系列小格子的color前一个继承下一个的,但这样做好象color属性无法用?
for i:= 1 to 44 do
begin
findcomponent('panel'+inttostr(i)).color:=findcomponent('panel'+inttostr(i+1)).color;
end;
for i:= 1 to 44 do
begin
findcomponent('panel'+inttostr(i)).color:=findcomponent('panel'+inttostr(i+1)).color;
end;
解决方案 »
- 谁能帮忙写个这样的类,或有类似的例子也行
- 希望版主能把Com/DCom/MTS/COM+单独做成一个模块,让我们这些对Com/DCom/MTS/COM+感兴趣的能快速找到想到的东东。
- 如何才能真正的销毁窗体呢??
- 在窗口输入控件里输入输入后用ENTER键移动焦点到下一个输入焦点,如何实现?
- Exe 文件打包问题,求高手指点!
- 用install shield做安装盘,其自己带的只有ODBC3.51 我需要ODBC4.0组件,哪有下?
- 关于多窗体的问题
- 不久前听说DELPHI的帮助出中文的了,请问哪里能下载到中文帮助
- 哪里有十六进制编辑器软件下载,如Ulea??32之类的
- 有谁能给翻译成delphi语言吗?
- 几个与string有关的问题,请各位指点
- 在线等待,如何定期把数据库备份文件保存到其他机器上
panel1,panel2 :TPanel;
for i:= 1 to 44 do
begin
panel1 := findcomponent('panel'+inttostr(i)) as Tpanel;
panel2 := findcomponent('panel'+inttostr(i+1)) as Tpanel;
if (panel1<>NIL) AND (panel2 <>NIL) then
panel1.color:=panel2.color;
end;
begin
Tpanel(findcomponent('panel'+inttostr(i))).color:=Tpanel(findcomponent('panel'+inttostr(i+1))).color;
end;
begin
Tpanel(findcomponent('panel'+inttostr(i))).color:=Tpanel(findcomponent
( 'panel'+inttostr(i+1))).color;
end;