当前注册人数162855人 邮箱: 密码: 注册新用户 忘记密码
首页 C/C++/MFC C# ASP.NET VB.NET MATLAB   站内搜索 BBS讨论社区 下载代码说明/积分规则
为什么要注册?

1. 可以直接免费从本站下载代码,防止邮件发送不到您的邮箱,或登录不了国外网站

2. 可以设定关键字,当有您关心的代码收录时,邮件通知您

3. 对这里的代码进行评分和评论

4. 可以和大家一起分享你的源代码,得到更多的建议

ListView with Image on SubItems

C#在ListView中Subitem显示图片

2008年03月05日
C#, Windows, .NET, Win2K, WinXP, .NET 1.0, .NET 1.1, VS, VS.NET2002, VS.NET2003, Dev
这个程序实现了如何在ListView的列中显示图标或者图片,可以用于显示不同Item的状态。
相关知识
OAKListView.LV_ITEM lvi = new OAKListView.LV_ITEM();
// Row of the item

lvi.iItem = 5; 
// Column of the item

lvi.iSubItem = 5;
lvi.pszText = "OAKListView-" + I.ToString();
//Here you pass the mask of the item. In this case 

//the mask is the both, Image and the text

lvi.mask = OAKListView.LVIF_IMAGE | OAKListView.LVIF_TEXT; 
// Image index on imagelist

lvi.iImage = 1;
// Sending a message to make the changes

OAKListView.SendMessage(listView1.Handle, 
         OAKListView.LVM_SETITEM, 0, ref lvi);
源代码原文下载:
ListView with Image on SubItems This article describes how to implement ListView with image on subitems. It's very useful in programs that need to show the status of several items.

源码图片

从本站下载附件及源代码(1个附件,已经成功下载839次)

最值得关注的外文源代码

CheckBox ComboBox Extending the ComboBox Class and Its Items
A Much Easier to Use ListView that Supports Sorting and Grouping
SuperGrid - Yet Another listview control
Drag and Drop Items in a WPF ListView
评论(评论是增加积分的一个有效途径)
字数在300字内
请如实评论
本源代码共评论163次,此处显示最近20次评论! 查看所有评论

lanpy  2010年09月03日
先下来看看
afishincan  2010年05月09日
值得试试
wwy198917  2010年05月01日
试试
gspeed  2010年04月16日
蛮实用的
cz123  2010年04月05日
谢谢!值得试试
joysticker  2010年03月11日
谢谢!值得试试
Jempson  2010年03月08日
不好意思,我这里运行的结果是subitem修改了,但是没有显示出图片来,不知道为什么,我的系统是Windows XP
大工理  2010年01月23日
C#是RAD的好语言,这个例子很实用
胡金宇  2010年01月07日
想学习
jacky  2009年12月09日
C#是RAD的好语言,这个例子很实用
jine1987  2009年12月05日
好东西
xulinjun12  2009年12月03日
谢了
sun980346  2009年12月01日
tks
hwrose  2009年08月20日
xiexie~~~~~~
tongchen041123  2009年06月23日
不错
nudt312  2009年06月11日
好东西!!!
archer  2009年06月09日
很不错。。谢了
fish  2009年05月22日
thanks
xomix  2009年05月16日
不知道代码易懂不易懂
wfsgts  2009年05月15日
可以
字数在300字内
请如实评论
CopyRight (C) codesoso.com 2007-2009 All Rights Reserved   免责声明