473,581 Members | 6,733 Online
Bytes | Software Development & Data Engineering Community
+ 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_Node Click(....)
{
if (HasData)
lvwDetails.Smal lImageList = imgList1;
else
lvwDetails.Smal lImageList = 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 2115

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

Similar topics

1
348
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) item4.SubItems.Add(Format(Microsoft.VisualBasic.Timer - sngStartTime, "0.0" & " sec"))
2
8618
by: Kanaiya | last post by:
hello how to put images in either listbox or listview.bye. -- With regards, Gangani Kanaiya.
1
5663
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 is my code, but icon is not apperead with that code. Source code
0
1626
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 a res from 100x100 to 1280x1024 once it gets above 500x500 it starts jerking you can see the screen refreshing as it paints 2) sometimes the...
2
4260
by: GT | last post by:
Could someone please explain how to add images to a ListView other than in the first column?
1
4632
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 in my code I do the following to add items to the ListView. lvi = New ListViewItem With lvi .Text = "xxxxx" .SubItems.Add("yyyy") .ImageIndex...
2
2625
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 seems so dependent on the image being the "anchor" of each row that I don't understand how to modify it. Thanks. Dim lv As ListView lv =...
2
4785
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 this, i dont see an icon and the SubItem text! lstvUsers.Columns.Add(Privilege");//added only so the tile detail is
0
1996
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 SmallImageList.TransparentColor to the correct color, the background color of the image becomes the BackColor of the ListView control itself, instead of the row...
0
7854
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8134
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8296
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7880
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8157
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6539
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3807
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2295
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 we have to send another system
0
1119
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.