带有TImageList的透明PNG图像 [英] Transparent PNG image with TImageList

查看:83
本文介绍了带有TImageList的透明PNG图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Delphi XE。

I'm using Delphi XE.

我在表单上添加了一个TAdvGlowButton,并添加了一个带有透明PNG图像的TImageList作为图像源。当我在设计模式下查看表单时,按钮看上去完全正确,并且图像是透明的。但是,当我运行该程序时,图像的背景变为纯黑色。如果我没有正确理解,这不是TAdvGlowButton的错误,而是TImageList。

I added a TAdvGlowButton on my form and added a TImageList with one transparent PNG image as its source for images. When I view the form in the design mode, the button looks exactly right and the image is transparent. However, when I run the program, the background of the image turns to solid black. If I undestood correctly, this is not a bug of the TAdvGlowButton but TImageList.

是否有一种无需使用任何第三方组件即可解决此问题的方法?

Is there a way to fix this without using any 3rd party components?

推荐答案

我通过从项目管理器中打开项目设置并选中应用程序->启用运行时主题来解决了这个问题。这是什么愚蠢的选择?谁会什么时候想要启用运行时主题?

I solved this by opening the project settings from Project Manager and checked Application -> Enable runtime themes. What kind of silly option is this? When would anyone want to not enable runtime themes?

这篇关于带有TImageList的透明PNG图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆