471,306 Members | 1,238 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

ListView SmallImageList Problem

Hello All,

I am not sure if this is something Im overlooking, or a bug, or if its "just
the way it is." I am using VS2003.

I have a listview (in Details view), with the SmallImageList originally
unset (null). This is because I just display a "Please select a node in the
tree" type informational message.

When I select a node in the tree, then I either get some data in my list, or
I need to put up a "No Data Here" message in the list. When I have data, I
want to display an icon on the item to show what kind of data it is. When I
do not have data, I don't want to display an icon.

So, a simplified version of a piece of my code is this:

if (HasData)
lvwDetails.SmallImageList = imgList1;
lvwDetails.SmallImageList = null;

The problem is, once the SmallImageList is set to imgList1, it never
"releases" the icon spacing, even when the SmallImageList is set to null.
The item is always indented the same whether there is an icon or not.

So, what am I missing?

Feb 7 '06 #1
0 1997

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Simon Morris | last post: by
reply views Thread by Brian Henry | last post: by
1 post views Thread by Steve | last post: by
2 posts views Thread by mrmagoo | last post: by
2 posts views Thread by giddy | last post: by

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.