views:

71

answers:

1

dumb question here, but I can't figure it out...I have a label with an accelerator key set (e.g. "&Add") and I want to give focus to a textbox when that shortcut, Alt-A, is pressed. what event does this correspond to? I tried the click event but that didn't do anything...

edit: found my own answer - it sets focus to the control that is next in the tab order. so I guess my revised question is, is there a way to catch this so I can have it select all the text in the textbox?

+1  A: 

Handle GotFocus event of the TextBox

viky
oh, duh. I didn't notice a GotFocus event in the form designer for a textbox, but it's available in code. thanks.
toasteroven