473,472 Members | 2,211 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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:

tvwTheTree_NodeClick(....)
{
if (HasData)
lvwDetails.SmallImageList = imgList1;
else
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?

Thanks,
pagates
Feb 7 '06 #1
0 2094

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

Similar topics

1
by: Simon Morris | last post by:
How do you add I icon to a ListView at run time, the icon is in a ImageList (ImageIndex = 0)? I am using the follow code to add item. Dim item4 As New ListViewItem("Load Island Data", 1) ...
2
by: Kanaiya | last post by:
hello how to put images in either listbox or listview.bye. -- With regards, Gangani Kanaiya.
1
by: Mamatha | last post by:
Hi I have one application ,that diplays data from database into the listview control.While adding data to the listview i want to display an icon to the leftside of the first column's data.Here...
0
by: Brian Henry | last post by:
Ok whats going on here... got a couple problems... this is relevant now to this group since .NET 2.0 is finally RTM 1) draws really slow when making it a large form (resizing speed is jerky) to...
2
by: GT | last post by:
Could someone please explain how to add images to a ListView other than in the first column?
1
by: Steve | last post by:
OK, I am stumped. I cannot for the life of me get images to show in ListView items while the view is set to Details. I create an ImageList, set the SmallImageList to point to the ImageList, then...
2
by: mrmagoo | last post by:
I'm trying to fill a listview with data. I'm using the example from the help file, but how do I modify this to avoid using images? I want the exact same layout but without images. This procedure...
2
by: giddy | last post by:
hi, I have a listview on a form, the View is set to Tile. I also have an image list tied to the *smallImageList property, i have one image in the image list, its a png : 32X32 When i do...
0
by: svx | last post by:
Hello, I am painting individual rows in a ListView control with different colors, depending on state. I am also using a SmallImageList in Detail view. When I set the...
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,...
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
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,...
1
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: 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.