How to set up a Winform Field Focus text area field so that the user can go through them by pressing the Tab button?

The UI was created in VS 2008. I am using C # .... I need the user to move / focus between text fields from top to bottom by pressing the tab button. How can i do this?

+1
source share
2 answers

You have correctly set the TabIndex property TabIndex that it is sequentially from top to bottom. Then it will work automatically, and you do not need any code to move around the focus.

In other words, set the top TextBox TabIndex to 1, the next one you set to 2, etc., and then the one at the bottom will have the largest number (of the text fields, probably you want to have higher indexes for any OK buttons and similar so that the user can go to them after editing all text fields).

You can learn more about this here:

http://msdn.microsoft.com/en-us/library/system.windows.forms.control.tabindex.aspx

+2
source

On the Layout toolbar (usually displayed if you are in Design mode), click on the right-most part (this is called the tab order).

Now on each element of your designer a small box with a number will appear. Just tap all of your items in the order you like and they will be automatically reordered.

If you like to do this manually, just take the ho1 tip and change the property manually.

+3
source

Source: https://habr.com/ru/post/1311583/


All Articles