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

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

      private void ChildForm1_Load(object sender, EventArgs e)
            {
                ActiveControl = txt_fname;
    
            }
    

    i use this code it works fine on win tab control or dotnetbar supertab contrl

提交回复
热议问题