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

前端 未结 6 1476
醉酒成梦
醉酒成梦 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:48

    Try putting it in the Form_Shown() event. Because it's in a container, putting in the Form_Load or even the Form() constructor won't work.

提交回复
热议问题