开发者

ImageList in a ListView

开发者 https://www.devze.com 2023-03-13 04:44 出处:网络
I have an image list in a list view where previously the only images displayed were pdf\'s. This meant that that i could handle the double click event effectively to open pdf\'s. Now i have a differen

I have an image list in a list view where previously the only images displayed were pdf's. This meant that that i could handle the double click event effectively to open pdf's. Now i have a different requirement to display some plac开发者_如何学Goe holder thumbnails for other files in a folder. Is there a way in the listView_DoubleClick event to determine what picture was clicked in the image list, that way i can determine how to handle the event?

Thanks for your time


Determine what item was clicked, when you then have a ListViewItem instance you can check for the ListViewItem.ImageIndex property.

Edit: ListView.SelectedItem and/or ListView.SelectedItems are your friends here.

0

精彩评论

暂无评论...
验证码 换一张
取 消