wayliff

I'm having trouble being able to use CTRL + A to select all items of a fileview.

I'm able to do multiple selections and eventually select all by using Shift and the mouse but would like Ctrl + A to be available.

How can that be done

Thanks



Re: Windows Forms General Select All in FileView

nobugz

What control is a "fileview"





Re: Windows Forms General Select All in FileView

wayliff

oh my what an idiot i am...

I used the name i gave to it in the property...

I am referring to the ListView.





Re: Windows Forms General Select All in FileView

decyclone

private void listView1_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode == Keys.A)
{
listView1.SelectedItems.Clear();
foreach (ListViewItem Item in listView1.Items)
{
Item.Selected = true;
}
}
}





Re: Windows Forms General Select All in FileView

wayliff

Private Sub listView1_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
If (e.Control AndAlso (e.KeyCode = Keys.A)) Then
listView1.SelectedItems.Clear
For Each Item As ListViewItem In listView1.Items
Item.Selected
= true
Next
End If
End Sub

THANKS!!! Easy enough.