Topic: Загрузка иконок в кнопки из базы данных
Работает начиная с версии 6.4
Загрузка иконок в кнопки из базы данных
var
ImageList: TImageList;
begin
ImageList:=TImageList.Create(Form1);
ImageList.Masked:=false;
ImageList.ColorDepth:=cd32bit;
// size of images
ImageList.Width := 24;
ImageList.Height := 24;
ImageList.AddPngFromDatabase('icons', 'pngfile', 1);
ImageList.AddPngFromDatabase('icons', 'pngfile', 2);
ImageList.AddPngFromDatabase('icons', 'pngfile', 3);
Form1.Button1.Images := ImageList;
Form1.Button2.Images := ImageList;
Form1.Button3.Images := ImageList;
Form1.Button1.ImageIndex := 0;
Form1.Button2.ImageIndex := 1;
Form1.Button3.ImageIndex := 2;
end.
Проект с примером:
Dmitry.