列表视图项目选择.. ?? [英] listview item selection..??
本文介绍了列表视图项目选择.. ??的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hi groups,
我已经放置了一个listview控件,我想通过控件迭代并找到点击的事件项。
listView2.Items.Add(fname [i] .ToString(),i);
如何执行迭代找到点击的项目......?和它的项目。
谢谢 -
M?héshKum?r。 R
hi groups,
I have placed an listview control, i want to iterate thru the control and find the clicked event items.
listView2.Items.Add(fname[i].ToString(), i);
how i can perform the iteration to find the item clicked...? and its item.
thankz--
M?hésh Kum?r. R
推荐答案
您好,
您可以使用SelectedIndexChanged事件和SelectedIndices / SelectedItems属性来查找选择的项目。
如果你真的想在Click事件中使用Mouse位置,或者需要找出在详细视图中点击了哪个subitem,你可以使用
点p = listView1.PointToClient(Control.MousePosition);
ListViewItem l = listView1.GetItemAt(pX,pY);
周六,2005年7月23日09:42:41 +0200,Maheshkumar.R< cy ********** @ yahoo.com>写道:
Hi,
You can use the SelectedIndexChanged event with the SelectedIndices/SelectedItems properties to find the selected items.
If you really want to use the Mouse position in a Click event, or need to find out which subitem was clicked in detail view, you can use
Point p = listView1.PointToClient(Control.MousePosition);
ListViewItem l = listView1.GetItemAt(p.X, p.Y);
On Sat, 23 Jul 2005 09:42:41 +0200, Maheshkumar.R <cy**********@yahoo.com> wrote:
hi groups,
我已经放置了一个listview控件,我想通过控件迭代并找到点击的事件项。
listView2.Items.Add(fname [i] .ToString(),i);
我如何执行迭代来查找点击的项目......?和它的项目。
谢谢 -
M?héshKum?r。 R $ />
hi groups,
I have placed an listview control, i want to iterate thru the control and find the clicked event items.
listView2.Items.Add(fname[i].ToString(), i);
how i can perform the iteration to find the item clicked...? and its item.
thankz--
M?hésh Kum?r. R
-
快乐的编码!
Morten Wennevik [C#MVP]
--
Happy coding!
Morten Wennevik [C# MVP]
您好,
您可以将SelectedIndexChanged事件与SelectedIndices / SelectedItems属性一起使用来查找所选项目。
如果你真的想在Click事件中使用Mouse位置,或者需要找出在详细视图中点击了哪个subitem,你可以使用
Point p = listView1.PointToClient(Control.MousePosition);
ListViewItem l = listView1.GetItemAt(pX,pY);
星期六,2005年7月23日09:42:41 + 0200,Maheshkumar.R< cy ********** @ yahoo.com>写道:
Hi,
You can use the SelectedIndexChanged event with the SelectedIndices/SelectedItems properties to find the selected items.
If you really want to use the Mouse position in a Click event, or need to find out which subitem was clicked in detail view, you can use
Point p = listView1.PointToClient(Control.MousePosition);
ListViewItem l = listView1.GetItemAt(p.X, p.Y);
On Sat, 23 Jul 2005 09:42:41 +0200, Maheshkumar.R <cy**********@yahoo.com> wrote:
hi groups,
我已经放置了一个listview控件,我想通过控件迭代并找到点击的事件项。
listView2.Items.Add(fname [i] .ToString(),i);
我如何执行迭代来查找点击的项目......?和它的项目。
谢谢 -
M?héshKum?r。 R $ />
hi groups,
I have placed an listview control, i want to iterate thru the control and find the clicked event items.
listView2.Items.Add(fname[i].ToString(), i);
how i can perform the iteration to find the item clicked...? and its item.
thankz--
M?hésh Kum?r. R
-
快乐的编码!
Morten Wennevik [C#MVP]
--
Happy coding!
Morten Wennevik [C# MVP]
{
{
Image imp = new Bitmap(bmp);
图像缩略图= imp.GetThumbnailImage(300,300,null,new Inept());
imageless.Images.Add(thumbnail);
listView2.Items.Add(fame [i] .To(),I);
}
>
在这里,我想处理列表中图片的Click事件
控件,就像浏览器一样...如果我点击缩略图privet off left in
窗格,当我点击它时应该在右侧窗格中显示为完整图像是我的
要求,
请指导
Maheshkumar.OR
" Morten Wennevik" <莫************ @ hotmail.com>写在消息中
news:op.sucyjra5klbvpo@stone ...
{
{
Image imp=new Bitmap(bmp);
Image thumbnail = imp.GetThumbnailImage(300, 300, null, new Inept());
imageless.Images.Add(thumbnail);
listView2.Items.Add(fame[i].To(), I);
}
Here I want to handle the Click event of a pictures in the list
control,like explorer...if I click thumbnail privet off picture in left
pane, when I click it should display as full image in the right pane is my
requirements,
please guide
Maheshkumar.OR
"Morten Wennevik" <Mo************@hotmail.com> wrote in message
news:op.sucyjra5klbvpo@stone...
你可以使用$ B $的SelectedIndexChanged事件b。SelectedIndices / SelectedItems属性用于查找所选项目。
如果您真的想在Click事件中使用Mouse位置,或者需要
找出在详细视图中单击了哪个子项目,则可以使用
Point p = listView1.PointToClient(Control.MousePosition);
ListViewItem l = listView1.GetItemAt(pX,pY);
星期六,2005年7月23日09:42:41 + 0200,Maheshkumar.R< cy ********** @ yahoo.com>
写道:
Hi,
You can use the SelectedIndexChanged event with the SelectedIndices/SelectedItems properties to find the selected items.
If you really want to use the Mouse position in a Click event, or need to find out which subitem was clicked in detail view, you can use
Point p = listView1.PointToClient(Control.MousePosition);
ListViewItem l = listView1.GetItemAt(p.X, p.Y);
On Sat, 23 Jul 2005 09:42:41 +0200, Maheshkumar.R <cy**********@yahoo.com> wrote:
hi groups,
我已经放置了一个listview控件,我想通过控件
迭代并找到点击的事件项。
listView2.Items.Add(fname [i] .ToString(),i);
我如何执行迭代来查找点击的项目......?和它的
项目。
谢谢 -
M?héshKum?r。 R
hi groups,
I have placed an listview control, i want to iterate thru the control and find the clicked event items.
listView2.Items.Add(fname[i].ToString(), i);
how i can perform the iteration to find the item clicked...? and its item.
thankz--
M?hésh Kum?r. R
-
快乐的编码!
Morten Wennevik [C#MVP]
--
Happy coding!
Morten Wennevik [C# MVP]
这篇关于列表视图项目选择.. ??的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文