listbox "Select All Ctrl+A"

  • Thread starter Thread starter LJB
  • Start date Start date
L

LJB

How do I give my listbox a Select All or "Ctrl+A" event? I have
SelectionMode.MultiExtended chosen but there must be more to it.

thanks
LJB
 
Peter Duniho said:
It really depends on what you mean by "event". The word has a couple of
very specific meanings in the context of C# and .NET, but I'm guessing you
actually mean neither.

If that's correct, and all you really want is to provide a hot-key
shortcut for selecting everything in the ListBox, then it's simple: just
handle the KeyDown event, and if the data indicates the input you want
(the Control key modifier and the A key, in this case), select all the
items in the ListBox programmatically.

Pete

Yes, that is what I needed. Thank you.

I agree the definition of "event" is unclear. Somewhat like famous Bill and
"is" a few years back.
 
Back
Top