delphi ImageList

来源:百度知道 编辑:UC知道 时间:2024/06/08 14:34:34
delphi里的ImageList怎么用?
加入了的图片怎么显示出来?
如果使其Bitmap为二进制数据?

第一种:
var dxGraphicEditMain: TImage;
begin
dxGraphicEditMain.Picture.Bitmap.LoadFromStream;
end;

第二种:
var
tmp : Tbitmap;
ImageList1: TImageList;
begin
Tmp := Tbitmap.create;
Tmp.TransparentColor := clTeal;
Tmp.Transparent := True;
TImageList1.Add(Tmp, Tmp);

就直接放入ImageList控件,在里面放入若干个图标,此控件一般在做快速启动工具条的图标时使用,在表单上放入后,只要在做工具条是,在按钮的imageindex属性中选择ImageList的某个图标就行了,他的好处是把数个图标放在一个控件中,便于管理和使用