我想给一个窗体的所有IMAGE 的picture赋值(100分)

J

jhddx

Unregistered / Unconfirmed
GUEST, unregistred user!
for i:=0 to form1.ComponentCount-1do
begin
if Components is TImage then
begin
对所以image的picture属性赋值..怎么写
end;
end
 
for i:=0 to form1.ComponentCount-1do
begin
if Components is TImage then
begin
//TImage(Components).picture.bitmap.loadfrom('')
TImage(Components).picture.bitmap.assign()
end;
end
 
楼上正解
 
TImage(Components).picture.bitmap.assign()
其参数,一定要是TPicture或TGraphic类的东东,否则也会出异常的。。。
 
OK..搞出来了..谢谢各位!
 
多人接受答案了。
 

Similar threads

S
回复
0
查看
962
SUNSTONE的Delphi笔记
S
S
回复
0
查看
784
SUNSTONE的Delphi笔记
S
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
顶部