tbutton on timage在表单上倍加buff时有图形错误

发布于 2024-12-04 10:35:28 字数 319 浏览 3 评论 0原文

我们现在正在迁移到 Delphi XE(从 D7),当 Form.DoubleBuffer = True 没有 DoubleBuffer 时,我们在 TImage 上放置 TButton 时遇到问题

- OK:

在此处输入图像描述


使用 DoubleBuffer - 错误:

按钮周围有白色边框。没有 DoubleBuffering 按钮可以,但调整大小时会出现闪烁。

在Delphi XE2中也是同样的问题。

We are now migrating to Delphi XE (from D7) and we have a problem with TButton placed on TImage when Form.DoubleBuffer = True

Without DoubleBuffer - OK:

enter image description here

With DoubleBuffer - WRONG:

enter image description here

Around the button is white border. Without DoubleBuffering is button ok, but form flicker when resizing.

In Delphi XE2 is same problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

雨夜星沙 2024-12-11 10:35:28

如此处所述:http://qc.embarcadero.com/wc/qcmain。 aspx?d=75246

高桥智博于 9/6/2010 12:53:44 AM*

...
表单上使用 DoubleBuffered = False

黑色边框 = 测试用例错误(在表单上将 DoubleBuffered 设置为 True)

在表单上使用DoubleBuffered = True

白色边框 = 无法修复(Windows 主题库不会以 GDI 可读的方式绘制按钮标题,强制 VCL 使黑色不透明,从而阻止使用黑色使边框透明)

解决方案:使用 TBitBtn 代替。

As documented here: http://qc.embarcadero.com/wc/qcmain.aspx?d=75246

Tomohiro Takahashi at 9/6/2010 12:53:44 AM*

....
With DoubleBuffered = False on the form:

Black borders = Test Case Error (set DoubleBuffered to True on the form)

With DoubleBuffered = True on the form:

White borders = Cannot Fix (Windows theme library doesn't paint button Caption in a way that's readable with GDI forcing VCL to make black opaque which prevents black from being used to make the border transparent)

Solution: Use TBitBtn instead.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文