Ciao
how do I click an element of the listview with the Enter key of the keyboard?
Grazie
Hi Messere,
You can add a KeyPress event handler to your ListView, it would look like this:
private void listView1_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Enter) { var selected = this.listView1.SelectedItems[0]; AlertBox.Show($"Selected {selected.Text}"); } }
Please let me know if you have any questions about it!
Best,
Levie
Please login first to submit.