I'm creating a program using C# and I have lots of textbox and buttons. The thing is when I type something into textbox and type 'tap' button, it goes to weird area. I mean, after I finish typing in the first textbox, I want to move to the second textbox using 'tap' button but it goes to third textbox (because I made third one before second one) Is there any way to fix this easily? or should I make them from scratch?
Thanks
在设计器中,您应该看到“ TabIndex”属性,将其用作指定制表符顺序的序列:当您按下“ Tab”键时,焦点传递到索引比当前紧随其后的项目。
Each control has a TabIndex
property.
Start with the first control in the tab order being 1 and increment it in the next control.
Yes you can use the TabIndex
property for this purpose
Assign 0 to first Textbox
Assign 1 to 2nd Textbox
Assign 2 to 3rd Textbox
Assign 3 to 4th Textbox
and so on
When you press the Tab button focus goes to control with 0 tab index and then 1 and so on
You will want to set the tab order of your controls. See How to: Set the Tab Order on Windows Forms for details on how to do that.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.