shiju kv

shiju kv

  • NA
  • 91
  • 16.5k

ListBox control

Feb 6 2015 2:09 AM
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)