怎样动态添加BMP文件到TImageList中(100分)

  • 主题发起人 主题发起人 jxa
  • 开始时间 开始时间
J

jxa

Unregistered / Unconfirmed
GUEST, unregistred user!
各位大哥:
我在动态添加BMP文件到ImageList时遇到一个问题
ImageList1.Add(Image:TBitMap;Mask:TBitMap);
其中的“Mask”掩图是怎么得到的?
请各位大哥帮帮忙,谢谢!!!!!
 
ImageList1.Add(Bitmap, nil);
//ImageList1.FileLoad(rtBitmap,'Filename.bmp',clRed);
 
可以设置为Nil
Use 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 is ignored; it can be set to nil.
 
我的意思是
动态添加BMP文件到TIMageList中
显示的位图是透明的没有底色的
如果Maks=nil 则达不到这种效果
 
那就用我上面所列出的第二种方法
ImageList1.FileLoad(rtBitmap,'Filename.bmp',透明色);
 
错误是因为你文件不存在
 
爱元元的哥哥:你试试看
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
后退
顶部