开发者

System colour for inactive selected items in a listview?

开发者 https://www.devze.com 2023-04-09 06:20 出处:网络
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.

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

精彩评论

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