Reputation: 285
I'm using Delphi 2007. How can I put a GIF/PNG image on a BitBtn component? (Preferably, with alpha transparency supported)
Upvotes: 11
Views: 7672
Reputation: 59
PNGimage, which is included in Delphi 2009k, should do the job. If we can find it.
Upvotes: 0
Reputation: 3073
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.
Upvotes: 6
Reputation: 15548
PNG support is only fully supported by Delphi 2009. There is a freeware package (licensed as MPL 1.1) named GraphicEx which will allow you to load the images at design time/runtime, but you will not get the alpha blended transparency on the button in Delphi 2007.
Upvotes: 2
Reputation: 3727
Use a graphics program like Photoshop (or something less expensive) to convert the images to bitmaps. BitBtns don't accept GIF or PNG images.
Upvotes: 2