我通常使用此代码清空表单的所有文本框,当使用bunifu控件时它不起作用
public void (控件c)
{
foreach(c.Controls中的Control ct )
{
if(ct.GetType() == typeof(TextBox) || ct.GetType() == typeof(ComboBox))
{
ct.Text = "";
}
if(ct.Controls.Count != 0)
{
清除(Ct);
}
}
}
发布于 2021-07-18 01:29:55
我用过这段代码,但已经不能工作了。
public void Clear(Control c)
{
foreach (Control ct in c.Controls.OfType<BunifuTextBox>())
{
ct.Text = "";
if(ct.Controls.Count != 0)
{
Clear(ct);
}
}
}https://stackoverflow.com/questions/68422749
复制相似问题