双击imagelist,按add...加入图片,一次可以多个。

解决方案 »

  1.   

    现在的问题是已经在imagelist里家了图片,但不知道如何将image挂接到imagelist
      

  2.   

    你的意思是有了一个TImageList和一些Image,想要把Image放到TImageList里面去吧?在TImageList的父类TCustomImageList里面有个Add方法可以做到,看Delphi里面的帮助
    Adds an Image and its Mask to the image list object. function Add(Image, Mask: TBitmap): Integer;DescriptionUse the Add method to add images with their masks to an image list. It returns the index of the added image, or -1 if it fails. When the Masked property of the image list is False, the second bitmap handle is ignored; it can be set to nil.这样你就可以把一个Image加入到ImageList里面了阿
      

  3.   

    You can use code to realize your purpose. The TImageList maybe have this kind of method.
      

  4.   

    找不到imageindex属性?ImageList.Count
      

  5.   

    function Add(Image, Mask: TBitmap): Integer;Add函数的返回值就是Index.
      

  6.   

    非常简单!
    var bmp:Tbitmap;
    begin
    Imagelist.GetBitmap(1,bmp);
    Image.Assign(bmp);
    end;1为图在ImageList中的序号,ico就变为Imagelist.GetIco
      

  7.   

    大家都理解错了,我的意思是在imagelist里已经有图片,现在是要实现从imagelist里取出图片,放到image里,就像toolbutton一样,image出现图标
      

  8.   

    ehom(?!) (  ) 信誉:的理解对的
    不过好象用起来有问题
      

  9.   

    begin
    Imagelist1.GetIcon(strtoint(edit1.Text),icon);
    Image1.Picture.Assign(icon)
    end;
    功能已经能实现,但form的icon会随着改变,我要求它不能变化,只有 image才能变化,该怎么改代码呢
      

  10.   

    变量不能用icon,因为这里的icon就是Form.icon,即窗体图标!
    换成
    var myico:TIcon
    begin
    Imagelist1.GetIcon(strtoint(edit1.Text),myico);
    Image1.Picture.Assign(myico)
    end;
    就好了!没问题了吧!