473,466 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2040
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: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.