简体   繁体   中英

How do I put GIF/PNG/… image on a BitBtn in Delphi?

I'm using Delphi 2007. How can I put a GIF/PNG image on a BitBtn component? (Preferably, with alpha transparency supported)

PngComponents pack has a component named PngBitBtn wich can display correctly PNG's with alpha transparency. They are somewhat old, but they can be installed under Delphi 2007 with a little work.

Use a graphics program like Photoshop (or something less expensive) to convert the images to bitmaps. BitBtns don't accept GIF or PNG images.

Delphi 2009完全支持PNG支持。有一个名为GraphicEx的免费软件包(许可为MPL 1.1)允许您在设计时/运行时加载图像,但是您不会在按钮上获得alpha混合透明度德尔福2007。

PNGimage, which is included in Delphi 2009k, should do the job. If we can find it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM