473,385 Members | 1,661 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,385 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 2036
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.