如何将背景图像添加到 Delphi 表单 [英] How to add background images to Delphi forms

查看:20
本文介绍了如何将背景图像添加到 Delphi 表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在我的 delphi 表单中添加背景图片?我添加了一个 TImage,但现在标签不再可见,我的复选框文本位于蓝色框"中(蓝色是我选择的背景颜色).这个蓝色在背景图上看起来不太好看,隐藏的标签也不好看.我该如何解决这些问题?

How can I add a background image to my delphi form? I added a TImage, but now the labels aren't visible any more, and the texts of my checkboxes are in a blue "box" (blue is the background color i chose). This blue doesn't look very good on the background image, and the hidden labels also don't look good. How do I fix these problems?

推荐答案

对于标签:确保它们是透明的(Object Inspector 中的透明属性),并且它们在 Z 顺序中位于 TImage 的顶部的控制.要纠正这个问题,您可以在设计模式下对 TImage 组件执行Send to back"命令,它将使所有其他非窗口控件出现在其顶部.

For the labels: make sure that they are transparent (Transparent property in the Object Inspector), and that they are on top of the TImage in the Z-order of controls. To correct this you can execute the "Send to back" command on the TImage component in design mode, it will make all other non-windowed controls appear on top of it.

对于复选框,我不知道您的问题是什么,在 Delphi 2007 中,当放置在 TImage 上时,复选框会显示为正确透明.也许您使用的是较早的 Delphi 版本?如果是这样,最好在问题中提及这一点.根据主题是否处于活动状态,也可能存在不同的行为.同样,如果没有更多信息,很难说.

For the checkboxes I don't know what the problem in your case is, in Delphi 2007 checkboxes appear properly transparent when put over a TImage. Maybe you use an earlier Delphi version? If so it would be good to mention this in the question. There may also be a different behaviour depending on whether themes are active. Again, hard to say without further information.

这篇关于如何将背景图像添加到 Delphi 表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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