473,698 Members | 2,250 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ListView with Icons

Hi,

I have a listview with the View property set as Details. I have set 4
columns, and now I am trying to set some Icons on the column headers.

Is this possible?

Thanks in Advance

Mar 15 '06 #1
1 1951
Curious,

You would have to custom draw these items yourself. What I would do is
derive a class from ListView and override the OnPaint method. There, you
would call the base (to paint the control), then figure out the bounds of
the headers and draw your icons in there.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Curious" <th****@mail.gl obal.net.mt> wrote in message
news:11******** *************@z 34g2000cwc.goog legroups.com...
Hi,

I have a listview with the View property set as Details. I have set 4
columns, and now I am trying to set some Icons on the column headers.

Is this possible?

Thanks in Advance

Mar 15 '06 #2

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

Similar topics

0
254
by: Charles A. Lackman | last post by:
Hello, I am having a difficult time trying to get the ListView to Inset an new item at a particular index (Using Small or Large Icons). The following is an example: Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click ListView2.Items.Add(New ListViewItem("1", 0)) ListView2.Items.Add(New ListViewItem("3", 0)) ListView2.Items.Add(New ListViewItem("4", 0)) ListView2.Items.Insert(1,...
0
1509
by: Goldsworth_Systems | last post by:
On a VB6 form, I have a listview control associated with an imagelist control. The icons from the imagelist control (ImageList1) to display in the listview control (ListView1) are set by the following line: ListView1.Icons = ImageList1 This seems to work OK. After conversion to VB.Net, I get the following warning: UPGRADE_WARNING: Couldn't resolve default property of object ListView1.Icons. Click for more:...
3
12167
by: Ian | last post by:
Hi, I've been trying to create a listview and treeview with icons. You would think it's a pretty straight forward task. API documentation states you simply assign an ImageList - that's been populated either using VS.NET (my method) or programatically. I assigned the imagelist to the small icons in the listview. Even VS.NET has been satisfied with what I'm doing as it shows the listitems/treenodes with icons. As soon as I build/run...
3
6576
by: scoobydoo | last post by:
hi, I have a problem displaying icons at the right colour depthin a ListView. I've made an icon file, (using IconWorkshop 5), it has 3 icons within it. A 32x32 32bpp XP style icon, a 32x32 32bpp non-xp icon (no transparency), and a 16x16 version. I add these icons to an ImageList, which is then assigned to the LargeImageList property of the ListView.
3
9302
by: MikeY | last post by:
Hopefully someone can help me on this. I am using C#, making Windows forms. I have created a listView with checkbox's. I have enabled the checkboxes under the properties, and all the data, checkbox's and icons are displayed as they are meant to be. My problem is this, I am trying to achieve the same results as I get with CheckListBox(s), where I am able to select (Check-mark) various checkboxs items and able to alter the data. I do...
1
15077
by: Víctor | last post by:
I'm doing a kind of file explorer with some additional funcionalities. The problem is that I'm not able to draw file extension icons in a ListView. I know how obtain icons, but when I try to draw file icon, this isn't showed. I tried to do by two ways: 1- By creating the ListViewItem and adding it to ListView, then I get rectangle of icon element and paint a new icon in rectangle coordenates. I'm able to view icons while they are...
3
5892
by: Steve | last post by:
I have windows form with ListView control. The ListView control has few columns which user can sort by clicking the column header. I want the column header have the small triangle indicator of sort order. How can I implement that? Thanks
1
1445
by: Sander R | last post by:
Hi, I can't get the the listview (or toolbar) to display the alpha channels of XP icons correctly. I have a manifest file for my binary, and the xp theme is applied correctly. It is only the icons in the listview and toolbar (which uses standard imagelists that does not work). Anybody know how to fix this? Really appriciate any help :-)
4
2236
by: Ira Siyal | last post by:
Hi I had a project in VB6 which I upgraded to VB.NET recently. In the app, I am facing some issue with listview control. In the earlier app, I have set the Icons in listview through an imagelist. but i notice that while i execute the project in .net, the step that sets the icon prop. throws an exception.
0
1548
by: twoSeven | last post by:
hi, Here is what i want to do. I am making a file and folder browser similar to Windows Explorer with a treeview and listview.. In that, i get icons and thumbnails of a particular file/folder from a function(getMyIcon()) which interacts with shell to get icons and updates the two imagelists( for small and large icons).this in turn is used to update a listview to show the file/folder name and the icons. The problem is the UI becomes...
0
9160
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8897
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8862
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5860
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3050
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
2
2331
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2002
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.