Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi image.picture := imagelist.geticon(0); (https://www.delphipraxis.net/16529-image-picture-%3D-imagelist-geticon-0-%3B.html)

agm65 18. Feb 2004 16:00


image.picture := imagelist.geticon(0);
 
hallo leute ....
vielleicht erkennt ihr am code wo mein problem liegt...also
ich möchte ein icon aus meiner image list in ein bild einladen ...

ich dachte wie folgt
image.picture := imagelist.geticon(0);

aber das geht nicht....habe schon im forum gesucht aber nichts gefunden ...


danke euch allen !

Matze 18. Feb 2004 16:01

Re: ???? image.picture := imagelist.geticon(0); ??????
 
Bitte entferne erstmal die ganzen Fragezeichen aus dem Titel, so antwortet keiner gern.
Delphitags schaden auch nicht. ;)

Matze 18. Feb 2004 16:14

Re: image.picture := imagelist.geticon(0);
 
Probier's mal so:

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var MyIcon: TIcon;
begin
  ImageList.GetIcon(0, MyIcon);
  Image1.Canvas.Draw(0, 0, MyIcon);
end;
keine Ahnung, ob's geht.

Gandalfus 18. Feb 2004 16:29

Re: image.picture := imagelist.geticon(0);
 
Delphi-Quellcode:
image.picture.assign(imagelist.geticon(0));

agm65 18. Feb 2004 16:33

Re: image.picture := imagelist.geticon(0);
 
bei der unteren lösung gibts den fehler nicht genügend wirkliche paramater !
beim oberen sagt er mir was von: ich soll das nur machen wenn ich die bilder belegt hätte, habe ich aber index 0-5

Matze 18. Feb 2004 16:38

Re: image.picture := imagelist.geticon(0);
 
Vielleicht so:

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var MyIcon: TIcon;
begin
  ImageList.GetIcon(0, MyIcon);
  Image1.picture.assign(MyIcon);
end;

agm65 18. Feb 2004 16:42

Re: image.picture := imagelist.geticon(0);
 
Code:
imglsticqstatus.GetIcon(0, MyIcon);
imgicqstatus.picture.icon := (MyIcon);
geht leider auch nicht .... das ist bei visual basic alles viel besser geregelt,
mit den icons und pictures....

Matze 18. Feb 2004 16:46

Re: image.picture := imagelist.geticon(0);
 
Geht mein letztes Beispiel auch nicht?

agm65 18. Feb 2004 16:51

Re: image.picture := imagelist.geticon(0);
 
nein geht auch nicht ...das ist echt übel :)

hätte nicht gedacht das das in delphi so schwer ist ...dann kann ichs mir jetzt auch erstmal abschmicken ne icon in eine statusbar zu laden ....

ich könnte auch 6 einzelne bilder machen und dann image.pic = image2.pic
habe ich mal in vb gemacht um ocx zu vermeiden ...ist aber lame in delphi da keine ocx files gebraucht werden :) !

Gandalfus 18. Feb 2004 16:51

Re: image.picture := imagelist.geticon(0);
 
Delphi-Quellcode:
Image1.picture.bitmap.assign(MyIcon);


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:51 Uhr.
Seite 1 von 2  1 2      

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