简体   繁体   English

如何在Delphi中的BitBtn上放置GIF / PNG / ...图像?

[英]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? 我正在使用Delphi 2007.如何在BitBtn组件上放置GIF / PNG图像? (Preferably, with alpha transparency supported) (最好支持alpha透明度)

PngComponents pack has a component named PngBitBtn wich can display correctly PNG's with alpha transparency. PngComponents包有一个名为PngBitBtn的组件,它可以正确显示带有alpha透明度的PNG。 They are somewhat old, but they can be installed under Delphi 2007 with a little work. 它们有些陈旧,但它们可以通过一些工作安装在Delphi 2007下。

Use a graphics program like Photoshop (or something less expensive) to convert the images to bitmaps. 使用像Photoshop这样的图形程序(或更便宜的东西)将图像转换为位图。 BitBtns don't accept GIF or PNG images. BitBtns不接受GIF或PNG图像。

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

PNGimage, which is included in Delphi 2009k, should do the job. 包含在Delphi 2009k中的PNGimage应该可以胜任。 If we can find it. 如果我们能找到它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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