473,466 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

listview columns forecolor vb.net

I'm trying to display something like a grid with a listview, where the
first column is grayed and has an indicator in it that tells the user
that row has been processed. I would really like to stick with the
listview for this.

My question is can I have the first column be a different color than
the other ones. That way I can put a * in the column (or a check
character) to act as an indicator.

Mark

Nov 21 '05 #1
6 2371
<ma*****@yahoo.com> schrieb:
I'm trying to display something like a grid with a listview, where the
first column is grayed and has an indicator in it that tells the user
that row has been processed. I would really like to stick with the
listview for this.

My question is can I have the first column be a different color than
the other ones.


Yes, simply set the first item's 'UseItemStyleForSubItems' property to
'False'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2
Thanks.

Nov 21 '05 #3
In addition to this, can I put an icon into the 1st column to represent
success/failure of the process.

Mark

Nov 21 '05 #4
<ma*****@yahoo.com> schrieb:
In addition to this, can I put an icon into the 1st column to represent
success/failure of the process.


Take a look at the listview control's 'SmallImageList' and 'LargeImageList'
properties and the listview item's 'ImageIndex' property.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5
Thanks again.

Nov 21 '05 #6
Thanks. Thats all working now, but 1 more question just for
appearances.

In my first column, I put an icon. I have 'UseItemStyleForSubItems'
set to true for it so it will be the same as the rest. However, when I
select some rows in the list view under fullrowselect, the selection
color doesn't include the column where the icon is. It is still the
default background color.

Can I get around that ?

Thanks.

Nov 21 '05 #7

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

Similar topics

0
by: timtos | last post by:
I just started to create my own ListView control and already have big problems... I use the following code at the moment: protected override void OnPaint(PaintEventArgs pe) {...
0
by: willow1480 | last post by:
I am developing a small little Service Control Application. I am using a listview control with checkboxes and getting the list of services I want to control from a text file. When you check a...
4
by: Tom John | last post by:
Hi I have a ListView that i want to be able to modify the color of particular items depending on whether the value of the item they are about to be replaced with is higher, lower or the same: ...
3
by: | last post by:
Hello, I have a ListView control in Details view. When an item is un-checked, I want to change the ForeColor. The only way I have found to do this is to loop through all the items of the...
2
by: Terry Olsen | last post by:
Does anyone have an example of how I could print a ListView control? It'd sure be easier to do this than to try to format the output in DrawStrings... Thanks.
3
by: Steve Long | last post by:
I hope this isn't too stupid of a question but I'm looking for a way to change an item in a listview control when the mouse moves over it. I'd like to change its color and underline it for a...
1
by: Mike Johnson | last post by:
I have the following code below. The objective is to change the forecolor of the item if the item being added is different from the last item. Well it's not working. When I step thru the code it's...
4
by: murthyspd | last post by:
Hi I have placed a listview on my Access form. There are certain reminders that I am sending through this listview. If the task is 2 days old and not yet completed, it should appear in red....
1
by: plmanikandan | last post by:
Hi, I have a listview with items,subitems.I tems and subitems are added as below listView1.View = View.Details; listView1.Columns.Add("Column 1", 100,HorizontalAlignment.Center);...
1
by: James | last post by:
Hi All, I have an ownerdraw ListView control. I'm trying to use an ownerdrawn ListView control to draw and display images in the second column of a listview which is set to detail view. I...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
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: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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.