Yes. It is possible.

1) On your form, just drag a Listview.
2) In the Listview's Items property, add your strings (put 3 strings
for example).
3) Set the Listview's MultiSelect property to False.
4) In your Listview's KeyDown event, type:

        private void listView1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Delete)
            {
                listView1.Items.Remove(listView1.FocusedItem);
            }
        }

5) Run the program. There's at least one item selected. Keep pressing
the 'Del' (Delete) key and watch
   what will happen.



Cheers!


Benj


On Mar 5, 6:06 am, Shawn <[email protected]> wrote:
> I would like to delete a complete row froma listview by selecting a
> row and pressing delete, not a delete "button" but the actual delete
> key.  Is this possible or am I just missing something?

Reply via email to