更改的ListView的背景选择颜色? [英] Change background selection color of ListView?

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

问题描述

我怎样才能改变一个ListView选择的颜色?默认情况下,当用户选择一个项目它示出了蓝色背景。我想这个改为深灰色,或东西...
感谢您的帮助!

How can I change the selection color on a ListView? By default, when the user selects an item it shows a blue background. I want to change this to dark gray, or something... Thanks for the help!

推荐答案

ObjectListView - 围绕一个WinForm的ListView的包装 - 具有属性,让你控制所选行的背景色和前景色。它使用Obalix提出的技术,但它已经做了你的辛勤工作。

ObjectListView -- a wrapper around a WinForm ListView -- has properties to let you control the background and foreground color of the selected rows. It uses the technique that Obalix suggested, but it has already done the hard work for you.

所以,用一点点努力,你就可以生产这样的:

So, with a little effort, you can produce something like this:

感觉好公司行显示选择自定义前景和背景。

The "Feel Good Inc" row show a custom foreground and background for selection.

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

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