Winforms c# - Set focus to first child control of TabPage

前端 未结 6 1477
醉酒成梦
醉酒成梦 2020-12-29 06:03

Say I have a Textbox nested within a TabControl.

When the form loads, I would like to focus on that Textbox (by default the

6条回答
  •  借酒劲吻你
    2020-12-29 06:26

    I had a user control within another user control. textbox1.Select() worked for me but textbox1.Focus() did not work.

    You can also try setting Tabstop to false, textbox1.Focus(), TabStop true.

提交回复
热议问题