Hi Leute !
Ich möchte alle Controls in einer Form zurücksetzen. Dafür verwende ich :
foreach( Control mainCtl in this.Controls)
{
if( mainCtl is System.Windows.Forms.TextBox)
mainCtl.Text = "";
if( mainCtl is System.Windows.Forms.GroupBox)
{
foreach( Control grpCtl in mainCtl.Controls)
{
if( grpCtl is System.Windows.Forms.TextBox)
grpCtl.Text = "";
if( grpCtl is System.Windows.Forms.RadioButton)
grpCtl.Checked = false;
Bei den Radiobuttons geht das nicht, da es hier im Control kein Property dafür gibt !
Geht das auch anders ?
Bin für jeden Tip dankbar !
Ciao
Mario