Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi bild aus imagelist in Image (https://www.delphipraxis.net/92980-bild-aus-imagelist-image.html)

dajuhsa 29. Mai 2007 20:20


bild aus imagelist in Image
 
gut, ihr haltet mich jetzt warscheinlich für einen :stupid: volltrotel :oops: aber meine frage ist:

wie lädt man ein bild aus einer imagelist in ein image

hibbert 29. Mai 2007 20:33

Re: bild aus imagelist in Image
 
einfach mal die sufu benutzen ;)

[edit=Jelly] Mfg, Jelly[/edit]

dajuhsa 29. Mai 2007 20:43

Re: bild aus imagelist in Image
 
1. ich weiß, dass ich dumm bin.
2. Danke für die tolle antwort

DGL-luke 29. Mai 2007 20:48

Re: bild aus imagelist in Image
 
Ich würds mal per GetBitmap versuchen.

dajuhsa 29. Mai 2007 20:53

Re: bild aus imagelist in Image
 
hab schon mal n bisschen rumprobiert, aber ich hab dann immer probleme mit den typen TBitmap und TPicture

bitsetter 29. Mai 2007 20:59

Re: bild aus imagelist in Image
 
Hi,

Delphi-Quellcode:
imagelist1.GetBitmap(0,image1.Picture.Bitmap);

dajuhsa 29. Mai 2007 21:00

Re: bild aus imagelist in Image
 
Zitat:

Zitat von bitsetter
Hi,

Delphi-Quellcode:
imagelist1.GetBitmap(0,image1.Picture.Bitmap);

Danke Vielmals, ich hab wohl das Bitmap nach image1.picture vergessen

dajuhsa 29. Mai 2007 21:44

Re: bild aus imagelist in Image
 
ich hab jetzt noch ein problem:
Wenn in dem Image schon ein bild drin ist, dann lädt er kein neues mehr rein

bitsetter 29. Mai 2007 23:05

Re: bild aus imagelist in Image
 
Noch eine andere Möglichkeit:
Delphi-Quellcode:
var
  Bild: TBitmap;
begin
  Bild:= TBitmap.Create;
  try
    imagelist1.GetBitmap(0, Bild);
    image1.Picture.Bitmap.Assign(Bild);
  finally
    Bild.Free;
  end;
Das geht sogar auch, ist bestimmt nicht so gut.
Delphi-Quellcode:
 
  image1.Picture.Bitmap:= nil;
  imagelist1.GetBitmap(0, image1.Picture.Bitmap);

dajuhsa 30. Mai 2007 14:59

Re: bild aus imagelist in Image
 
Klappt super, vielmals danke :-D


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:42 Uhr.
Seite 1 von 2  1 2      

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz