Answers for "how ot handle items in list box after double click on them"

0

how ot handle items in list box after double click on them

ListBox1.MouseDoubleClick += new RoutedEventHandler(ListBox1_MouseDoubleClick);
Posted by: Guest on March-11-2022
0

how ot handle items in list box after double click on them

private void listBox1_DoubleClick(object sender, MouseEventArgs e)
    {
        int index = this.listBox1.IndexFromPoint(e.Location);
        if (index != System.Windows.Forms.ListBox.NoMatches)
        {
            MessageBox.Show(listBox1.SelectedItem.ToString());
        }
    }
Posted by: Guest on March-11-2022
0

how ot handle items in list box after double click on them

private void ListBox1_MouseDoubleClick(object sender, RoutedEventArgs e)
 {
     if (ListBox1.SelectedItem != null)
     {
         MessageBox.Show(ListBox1.SelectedItem.ToString());
     }
 }
Posted by: Guest on March-11-2022

Code answers related to "how ot handle items in list box after double click on them"

Browse Popular Code Answers by Language