Attach components to GroupBox in C#

后端 未结 3 922
悲&欢浪女
悲&欢浪女 2021-02-19 06:44

I want to insert a group box in the form and put in 3 radio buttons in it.

Are there any advantages in attaching the 3 radio buttons to the groupbox.? Cab we even do tha

3条回答
  •  不知归路
    2021-02-19 07:25

    Also you can do it on one line:

    groupBox1.Controls.AddRange(new Control[] { radioButton1, radioButton2, radioButton3 });
    

提交回复
热议问题