更改ListView控件的背景色在VB6 [英] Change background color of ListView in VB6

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

问题描述

我和一些遗留code工作,需要根据一些标准来更改行(和字体颜色)的背景颜色在ListView在VB6。我需要在选择了行,而不是选择成改变该行的颜色。我可以通过.Foreground属性更改非选择行的字体颜色,但我不能在任何其他情况下改变颜色。

I'm working with some legacy code and need to change the background color of a row (and the font color) in a ListView in VB6 based on some criteria. I need to change the color of the row when the row is selected and not selected. I can change the font color of a non-selected row via the .Foreground property but I can't change the color in any of the other scenarios.

推荐答案

选定的行的背景颜色是由系统控制。你无法将其更改为别的了。

The background color of selected rows is controlled by the system. You cannot change it to anything else.

如果您的有无的是能够改变所选行的背景下,您将需要自定义绘制列表视图 - 这,说实话,是太痛苦认真考虑:)

If you have to be able to change the background of the selected rows, you will need to custom draw the listview -- which, to be honest, is too much of a pain to seriously consider :)

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

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