UI is created in VS 2008. I’m using C# …. I need to let the user move/focus between text fields from top to bottom by clicking tab button. How can i do it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You just set up the
TabIndexproperty properly, so that it’s sequential from top to bottom. Then it’ll work automatically and you won’t need any code to move around the focus.So in other words, set the top
TextBoxTabIndexto 1, the next one you set to 2 etc and then one at the bottom will have the highest number (of the textboxes, you probably want to have even higher indexes for any OK buttons and similar so that the user can jump to them after editing all the textboxes).You can find more info about it here:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.tabindex.aspx