G
goltiger
Unregistered / Unconfirmed
GUEST, unregistred user!
请教:我动态创建了一系列图片,这些图片的点击事件如何写,for i:=0 to 65 do begin timage.Create(self).Name:=ss+inttostr(i); with timage(findcomponent(ss+inttostr(i))) do begin left:=((i+11) mod 11)*40+20; top:=(trunc((i+11)/11)-1)*50+20; parent:=panel2; picture.loadfromfile(extractfilepath(paramstr(0))+'data/newface/'+inttostr(i+1)+'.bmp'); onclick:=myiamgeclick; end;//timage end;//for iprocedure tfrmface.myiamgeclick(sender:tobject);begin//////////////////////////内容如何写,比如想在edit1上显示所点击图片的文件名。///////////////////////////end;//