简体   繁体   English

在Winform上自动设置焦点

[英]Focus set automatically on Winform

I have a form which contains some textBoxes. 我有一个包含一些文本框的表单。 I have configured the textBox's GotFocus and LostFocus events. 我已经配置了textBox的GotFocus和LostFocus事件。

My problem is: When some textBox loses focus, the form automatically set the focus on the first textBox and it triggers the GotFocus event again. 我的问题是:当某些textBox失去焦点时,该窗体会自动将焦点设置在第一个textBox上,并再次触发GotFocus事件。

How do I not set the focus by default?

Check the tabindex of the text boxex from where focus is transferred to first text box. 检查从焦点转移到第一个文本框的文本框ex的tabindex。 I think the TabStop property is set to false for the textboxes for some of the controls. 我认为某些控件的文本框的TabStop属性设置为false。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM