透明的ListView背景 [英] transparent ListView background

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

问题描述

看了又看,却找不到像我这样的新手在listview框上获得透明背景的超级简单方法. (我知道如果是蛇,它会咬我,哈哈)

也许有一种超级简单的方法可以执行我想要的...我想从子目录或listview项列表中进行选择.列表或列表视图具有透明背景,因此您只看到文本(在我的情况下为子文件夹的名称).表单本身具有背景图像,我希望将其显示在列表或列表视图框中,并使列表视图文本与表单背景一起可见.

寻找简单,快速和清洁的方法:-)

*我是新手,我可能不会收拾您放下的东西,但感谢您的尝试. :-)

looked and looked and couldn''t find a super simple way for newbies like me to get a transparent background on a listview box. (I know if it was a snake it would have bitten me, haha)

Maybe there''s a super simple way to do what I''m wanting... I want to select from a list of subdirectories or listview items. The list or listview having a transparent background so you just see the text(in my case the names of subfolders). The form itself has a background image and I want that to show through into the list or listview box with the listview text visible along with the form background.

looking for simple, fast and clean :-)

* I''m a newbie and I probably won''t pickup what you''re putting down, but thanks for trying. :-)

推荐答案

默认情况下,控件不支持透明背景.
您可以从基本listview类派生一个usercontrol,并添加具有透明背景的功能.

此处 [此处 [ [
Controls do not support transparent background by default.
You can derive a usercontrol from the base listview class and add the capability to have a transparent background.

Here [^]is an article on how to make a custom listbox that include transparency.

Here[^] is a more basic article on making transparent controls.

See this [^]also.


链接 [带有透明图片的图片框 [
This link[^] should be helpful. It basically says to derive a new class from the control and override the OnPaintBackground method to do nothing.

Copied from this previous answer:
PictureBox with Transparent Picture[^]


如果制作透明画笔,则背景不起作用,则可能无法完成.
If making a transparent brush the background does not work, then it probably can''t be done.


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

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