private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)
{
label1.Text = (sender as ListBox).SelectedIndex.ToString() // 行号(从0开始)
label2.Text = (sender as ListBox).SelectedItem.ToString() // 该项的值
}
欢迎分享,转载请注明来源:内存溢出
private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)
{
label1.Text = (sender as ListBox).SelectedIndex.ToString() // 行号(从0开始)
label2.Text = (sender as ListBox).SelectedItem.ToString() // 该项的值
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)