如果表单上有 TabControl,AcceptButton 不起作用
在下面的表单中,我希望AcceptButton
为OK按钮,但是虽然我给Form设置了属性OK按钮为接受按钮,但实际结果是Test按钮。
如何修复它?
In the following form, I want the AcceptButton
to be OK button, but although I set the property to the Form that OK button is the accept button, the actual result is Test button.
How to fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
早些时候我遇到过这样的问题,但很容易解决。 “测试”按钮的 TabIndex 很有可能小于“确定”按钮的 TabIndex。只要把它弄反就可以了。它应该有效。至少它对我有用。如果没有,只需检查 TabControl TabIndex,它也应该比您的“确定”按钮大。
希望有帮助。
Earlier i got this kind of problem, but got solved easily. It is very much possible that Test button TabIndex is less than that of OK button. Just make it reverse. It should work. At least it worked for me. If not, just check the TabControl TabIndex, it should also be greate than your OK button.
Hope it helps.