110,538
社区成员
发帖
与我相关
我的任务
分享
public Form1()
{
//InitializeComponent();
FlowLayoutPanel p1 = new FlowLayoutPanel() { Dock = DockStyle.Top };
FlowLayoutPanel p2 = new FlowLayoutPanel() { Dock = DockStyle.Bottom };
foreach (string caption in "早,午,下,夜".Split(','))
{
p1.Controls.Add(new RadioButton() { Text = caption, Appearance = Appearance.Button, Width = 32 });
}
foreach (string caption in "一,二,三,四,五,六,日".Split(','))
{
p2.Controls.Add(new CheckBox() { Text = caption, Appearance = Appearance.Button, Width = 32 });
}
this.Controls.AddRange(new Control[] { p1, p2 });
}