473,324 Members | 2,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

ListView Items coloring

Hi all, I've got problem with ListView in VB.NET. I want to colorlines (odd and even with different colors - gray and white). I'musing item.backcolor property which works fine, but... If Iclick on the listview outside the items when current line isgray, it will unselect and remains white! Also listening onselectindexchange or mousedown or whatever on listview doesn'thelp. The problem probably is that all these methods are calledbefore the unselection is done :( It would be great to telllistview that it should apply backcolor setting of an itemduring unselection... Does anyone know some solution?

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>Qz3g6ybNEkux4+nGGeA/SA==</Id>
Nov 21 '05 #1
1 2031
Paja via .NET 247 <an*******@dotnet247.com>'s wild thoughts
were released on Sun, 31 Oct 2004 03:46:57 -0800 bearing the
following fruit:
Hi all, I've got problem with ListView in VB.NET. I want to color lines (odd and even with different colors - gray and white). I'm using item.backcolor property which works fine, but... If I click on the listview outside the items when current line is gray, it will unselect and remains white! Also listening on selectindexchange or mousedown or whatever on listview doesn't help. The problem probably is that all these methods are called before the unselection is done :( It would be great to tell listview that it should apply backcolor setting of an item during unselection... Does anyone know some solution?


Please fix your line length

This is what I see

Hi all, I've got problem with ListView in VB.NET. I want to
color lines (odd

Jan Hyde (VB MVP)

--
"I'm a mathematician," Tom added summarily. (Richard Lederer)

[Abolish the TV License - http://www.tvlicensing.biz/]

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Dave Y | last post by:
I am a newbie to C# and am having trouble trying to override a ListView property method. I have created a new class derived from the Forms.Listview and I cannot figure out the syntax to override...
0
by: Paja via .NET 247 | last post by:
Hi all, I've got problem with ListView in VB.NET. I want to colorlines (odd and even with different colors - gray and white). I'musing item.backcolor property which works fine, but... If Iclick on...
6
by: Nick | last post by:
Hi there, I'm trying to implement drag-drop for my listview control in large icon view mode. Unfortunately the order of the items gets completely messed up upon inserting the item back into the...
12
by: J L | last post by:
When I fill a listview, I resize the columns to fit the data. I need to know if the data will fit vertically or if there will be a vertical scroll bar. I need to know this so I can allow for it on...
5
by: Phill W. | last post by:
(VB'2003) What's the correct way to remove multiple, selected items from a ListView control (say, from a ContextMenu)? I ask because I'm getting a very annoying ArgumentOutOfRangeException...
1
by: samoore33 | last post by:
I found this code on MSDN, and it works great. It creates a ListView dynamically and add items to it and all. It is great. I have changed a few of the column names to suit me. Dim listView1 As...
0
by: Peter | last post by:
Hi, I have a problem with Listview using checkboxes. If i check items by code BEFORE the form is shown the Listview.Items are confused during the ItemChecked Event !!! After showing the...
2
by: Peter | last post by:
Hi, I have a problem with Listview using checkboxes. If i check items by code BEFORE the form is shown the Listview.Items are confused during the ItemChecked Event !!! After showing the...
1
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, In my application I need to periodically remove all current items from a ListView and add a new set into it. The following abbreviated code contains the basic idea: private void...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.