Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#18

Re: ImageList Bitmap hinzufügen

  Alt 8. Feb 2008, 14:46
Ach das is doch Quatsch wenn ihr ihn jetzt ne eigene Klasse dafür schreiben lasst -.-^^ (Ok zum lernen kanns nicht schaden...)

Damit das hier mal ein Ende findet:

Delphi-Quellcode:
// EIN (1) Bild zur ImageList hinzufügen
ImageList1.Add(Image1.Picture.Bitmap, nil);
mehrere?



Delphi-Quellcode:
// n Bitmaps zur ImageList hinzufügen
ImageList1.Add(Bitmap1, nil);
ImageList1.Add(Bitmap2, nil);
ImageList1.Add(Bitmap3, nil);
//...
ImageList1.Add(BitmapN, nil);
Das ganze geht je nachdem auch mit einer Schleife:


Delphi-Quellcode:
// n Bitmaps zur ImageList hinzufügen
for i:= 1 to n do
  ImageList1.Add(Bitmap[i], nil);


Jetzt alles klar?

Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat