开发者

System colour for inactive selected items in a listview?

Is there any system colour that define the background of a listview item when the control has no 开发者_如何学JAVAfocus and the selection is not hidden? I'm not able to find it if so.

EDIT: I think it is the one listed in .Net as MenuBar (or ControlFace, or Control), but it would be nice if someone could confirm it.


I have always used the SystemColors.Control color for that and it's never not matched.

If using VisualStyles, you can try rendering it yourself:

var vsr = new VisualStyleRenderer(
    VisualStyleElement.ListView.Item.SelectedNotFocus);
vsr.DrawBackground(e.Graphics, rect);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜