Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi _Icon_ in SpeedButton? (https://www.delphipraxis.net/43200-_icon_-speedbutton.html)

Pseudemys Nelsoni 30. Mär 2005 15:06


_Icon_ in SpeedButton?
 
Moin,

wie bekomme ich ein Icon in ein SpeedButton? Ich habe es bisher so versucht;

Delphi-Quellcode:
    Icon.Handle := LoadImage(hInstance, MAKEINTRESOURCE(1002), IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR);
SpeedButton1.Glyph.Assign(Icon);
gibt aber eine AV.

Jemand ne Idee?

jim_raynor 30. Mär 2005 15:29

Re: _Icon_ in SpeedButton?
 
Hast du auch vorher Icon:=TIcon.Create gemacht?

Pseudemys Nelsoni 30. Mär 2005 16:11

Re: _Icon_ in SpeedButton?
 
moin jim,

jo habe ich, der Fehler tritt beim "Assign" auf

Pr0g 30. Mär 2005 16:19

Re: _Icon_ in SpeedButton?
 
"Glyph" ist vom Typ "TBitmap", du müsstest dein Icon also erst umwandeln ;)

MfG Pr0g


Alle Zeitangaben in WEZ +1. Es ist jetzt 11:39 Uhr.

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