3

Basic question, 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?

Mantosh Kumar
  • 5,659
  • 3
  • 24
  • 48
toasteroven
  • 2,700
  • 3
  • 26
  • 35

1 Answers1

1

Handle GotFocus event of the TextBox

viky
  • 17,275
  • 13
  • 71
  • 90
  • oh, duh. I didn't notice a GotFocus event in the form designer for a textbox, but it's available in code. thanks. – toasteroven Nov 10 '09 at 17:55