none
C#如何响应ListView的item的双击事件 RRS feed

答案

  • 你好,

    你可以试试以下的一段:

    private void listView1_DoubleClick(object sender, EventArgs e)
    
    {
    
    // user clicked an item of listview control
    
    if (listView1.SelectedItems.Count == 1)
    
    {//display the text of selected item
    
    MessageBox.Show(listView1.SelectedItems[0].Text);
    
    }
    
    }
    



    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    2015年6月26日 8:39
    版主