在列表视图中更改所选项目颜色 [英] Change selected item color in listview
本文介绍了在列表视图中更改所选项目颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在列表视图中更改所选项目颜色,使用时:
listview1.selecteditem(0).forecolor = color.red
它有效但当我将鼠标悬停在它上面并再次选择它时会变成黑色(listview的标准颜色)
有什么帮助吗?
Hi, I want to change selected item color in listview, when using:
listview1.selecteditem(0).forecolor = color.red
it works but when i hover the mouse on it and select it again it turns to black ( the standard color of listview )
any help please?
推荐答案
使用图片框在lvw图片属性后面绘制
Use picture box to draw behind the lvw picture property
如果选择了写入条件= true,然后在selectedindexchnage事件中使用color.red
write condition if selected = true then color.red in selectedindexchnage event
这篇关于在列表视图中更改所选项目颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文