How to focus a text field using Alt + letter

I need to quickly focus the text box using the Alt + Letter combination. In my form, there is a label for each text field. For this shortcut, I can specify the name as ' & My Label and the M letter will be underlined when I press the Alt button. But how can I focus the text field (in winforms)?

PS As I recall, WPF has the ability to associate a shortcut with a text box. And if the shortcut receives the focus field, the focus will automatically focus.

+4
source share
2 answers

It works automatically. Just make sure the TextBox you want to focus on is next in tab order, i.e. If Label has TabIndex = 0, TextBox requires TabIndex = 1.

+9
source

You need to set the tab index. It will be automatically processed. You can view / set tab index

View> Tab Order Menu

0
source

All Articles