469,156 Members | 2,136 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,156 developers. It's quick & easy.

backcolor in ListView Item

In a ListView control (two columns), I added a few
ListView items.

ListView listview=new ListView();
listview.Parent=this;
listview.View=View.Details;
listview.Columns.Add
("Col1",200,HorizontalAlignment.Left);
listview.Columns.Add
("Col2",800,HorizontalAlignment.Left);

ListViewItem lvi=newLitViewItem("1");
lvi.SubItems.Add("Item 1");
listview.Items.Add(lvi);

ListViewItem lvi=newLitViewItem("2");
lvi.SubItems.Add("Item 2");
listview.Items.Add(lvi);

When clicking one of the items, the selected one had

backcolor light grey.

But when change focus from the other controls in same form

to the ListView control, the focused ListView item had

backcolor blue.

What I want is set backcolor light grey for ListView items

when they get focus.

How to do it?

Thanks

Keith
Nov 15 '05 #1
0 1961

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by J_Max | last post: by
2 posts views Thread by Anushya devi | last post: by
3 posts views Thread by MikeY | last post: by
6 posts views Thread by Kevin | last post: by
6 posts views Thread by Brandon McCombs | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.