Click here to Skip to main content
15,915,019 members

Comments by UFONE1 (Top 1 by date)

UFONE1 2-May-20 17:43pm View    
Another way is to use click event of the list box , if we do not want to double click the one list box item for the deselection of another list items.
ex:


private void ListBox_Right_Click(object sender, EventArgs e)
{
Btn_Left.Enabled = ListBox_Right.SelectedIndex >= 0;
ListBox_Left.ClearSelected();
Btn_Right.Enabled = false; // for my specification
}
}



private void ListBox_Left_Click(object sender, EventArgs e)
{

Btn_Right.Enabled = ListBox_Left.SelectedIndex >= 0;
ListBox_Right.ClearSelected();

Btn_Left.Enabled = false;// for my specification
}