On Thu, 25 Sep 2008 13:33:00 -0700, Ray Mitchell
<Ra*****************@meanoldteacher.comwrote:
Hello,
I have a textbox containing a listview of items. I would like to set it
up
so that when that textbox has the focus and I press ctl-A from the
keyboard
it selects all the items.
For a control that has the focus, handling the KeyPress event would
normally be sufficient for your needs. In the event handler, you can do
whatever action should happen at that time.
For certain kinds of objects, they handle shortcut keys internally, based
on properties set (e.g. menus that have menu items with specific keys, or
buttons that have an accelerator key specified in the button text), but
for a text box you'll have to do this yourself.
Honestly, your description of "a textbox containing a listview of items"
is somewhat confusing. I mean, all Control instances can have child
controls, but it's not something one would typically do with a TextBox
instance. But regardless, hopefully the above provides the information
you need.
Pete