2005中Listview和RichTextBox的问题 怎么将ListView中绑定ImageList的图片点击后显示到RichTexrBox中。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 通过ImageListIndex来获得ImageList中Image对象,至于如何往RichTextBox中放入图片参看http://www.codeproject.com/cs/miscctrl/csexrichtextbox.asp 把图片拷进 My.Computer.Clipboard ,然后粘贴到RichTextBox My.Computer.Clipboard.SetImage([你ImageList里的图片])然后RichTextBox.Past() 感谢两位的帮助。to Knight94(愚翁)我已经实现了向richtextbox中插入图片了,但是我现在不明白的就是怎么取到listview中选择的图片。ImageListIndex是什么? Sample code as follows:Image imgItem = yourImageList[yourItem.ImageIndex]; 呵呵还是不明白,跟listview怎么关联上阿? to 还是不明白,跟listview怎么关联上阿?Sample code as follows:ListViewItem yourItem = yourListView.Items[i];Image imgItem = yourImageList[yourItem.ImageIndex]; 哈哈 弄出来了,感谢 Knight94(愚翁) 的帮助,给分结贴。大家看看吧,我的代码。private void listView1_DoubleClick(object sender, EventArgs e) { Image imgItem = imageList1.Images[listView1.SelectedIndices[0]]; richTextBox1.InsertImage(new Bitmap(imgItem)); } C#调用dll后运算速度降低 jquery 怎么给下拉框赋值? 在form2里面如何改变form1里面控件的属性 c# 为什么不能为一个substring赋值?? ---代码看不懂,请高手指点 iBatis.net的resultClass问题,在oracle下。 一个简单绑定 跪求大家帮我写个程序,非常感谢 请高手给予指点和帮助,关于接口的问题,散分!在线等待。 时间的问题2个 求做收发邮件软件的资料! 请问怎样给一个字符串加上下划线?
参看
http://www.codeproject.com/cs/miscctrl/csexrichtextbox.asp
然后RichTextBox.Past()
我已经实现了向richtextbox中插入图片了,但是我现在不明白的就是怎么取到listview中选择的图片。
ImageListIndex是什么?
Image imgItem = yourImageList[yourItem.ImageIndex];
还是不明白,跟listview怎么关联上阿?
ListViewItem yourItem = yourListView.Items[i];
Image imgItem = yourImageList[yourItem.ImageIndex];
大家看看吧,我的代码。
private void listView1_DoubleClick(object sender, EventArgs e)
{
Image imgItem = imageList1.Images[listView1.SelectedIndices[0]];
richTextBox1.InsertImage(new Bitmap(imgItem));
}