1
Answer

ListBox control

shiju kv

shiju kv

10y
844
1
I would like to chang the values of list by the up and down arrow keys of keyboard,
how to make it. nowi am using some lines under 'keydown' event of list box
listBox1.Focus();
listBox1.Select();
listBox1.Visible = true;
if (e.KeyCode == Keys.Up)
{
this.listBox1.SelectedIndex--;
}
else if (e.KeyCode == Keys.Down)
{
this.listBox1.SelectedIndex++;
}
}
 
Answers (1)