By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,214 Members | 2,066 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,214 IT Pros & Developers. It's quick & easy.

backcolor in ListView Item

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.