摘要:usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;usingDevComponents.DotNetBar;usingDevComponents.D
usingSystem;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
usingSystem.Data;
usingSystem.Drawing;
usingSystem.Text;
usingSystem.Windows.Forms;
usingDevComponents.DotNetBar;
usingDevComponents.DotNetBar.Controls;
namespaceCsharpTest
{
publicpartialclassForm1 : Form
{
publicForm1()
{
InitializeComponent();
}
privatevoidbtnAdd_Click(objectsender, EventArgs e)
{
foreach(Control c inthis.panelEx1.Controls)
{
if(c isDevComponents.DotNetBar.Controls.TextBoxX)
{
c.Text ="123";
}else
{
c.Text ="名称!";
}
}
}
privatevoidbtnClear_Click(objectsender, EventArgs e)
{
foreach(Control d inthis.panelEx1.Controls)
{
if(d isDevComponents.DotNetBar.Controls.TextBoxX)
{
d.Text ="";
}
else
{
d.Text ="更改后的名称";
}
}
}
}
}
privatevoidClearText()
{
foreach(Control myControl inthis.panelTable.Controls)
{
if(myControl isDevComponents.DotNetBar.LabelX)
{
continue;
}
myControl.Text ="";
}
}