110,567
社区成员
发帖
与我相关
我的任务
分享
private void check_checkbox(object sender, EventArgs e)
{
text_show.Text = "";
foreach (System.Windows.Forms.CheckBox tb in panel1.Controls)
{
if (tb.Checked)
{
text_show.Text = tb.Name[4]+text_show.Text.ToString();
}
}
}
private void check_checkbox(object sender, EventArgs e)
{
text_show.Text = "";
foreach (System.Windows.Forms.CheckBox tb in panel1.Controls)
{
if (tb.Checked == true)
{
text_show.Text = tb.Name[4]+text_show.Text.ToString();
}
}
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
char [] array1=new char [5];
foreach (System.Windows.Forms.CheckBox tb in panel1.Controls)
{
if (tb.Checked == true)
{
array1 = tb.Name.ToCharArray();
text_show.Text += array1[4].ToString();
}
}
}
}