Ignacio Gómez
Ignacio Gómez

Reputation: 1627

Focus set automatically on Winform

I have a form which contains some textBoxes. I have configured the textBox's GotFocus and LostFocus events.

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.

How do I not set the focus by default?

Upvotes: 0

Views: 483

Answers (1)

Romil Kumar Jain
Romil Kumar Jain

Reputation: 20745

Check the tabindex of the text boxex from where focus is transferred to first text box. I think the TabStop property is set to false for the textboxes for some of the controls.

Upvotes: 1

Related Questions