Kriti

Kriti

  • NA
  • 60
  • 0

Clicking of radio button should make a section visible.

May 3 2010 8:21 AM

i have two section(top and bottom) in my GUI page..In bottom section i have 2 radio button.
When i click one radiobutton,some date and user name gets displayed in the same bottom section of page.
public
partial class ProStatusPart : SmartPart
{
public ProStatusPart()
{

InitializeComponent();
rdProd.CheckedChanged +=
new EventHandler(Action_CheckedChanged);
rdNonProd.CheckedChanged +=
new EventHandler(Action_CheckedChanged);
rdProd.Checked =
true;
}
void Action_CheckedChanged(object sender, EventArgs e)
{
if (rdProd.Checked)
{

prodstatusPart.Visible =
true;
nonProdStatusPart.Visible =
false;
}
else if (radNonProdStatus.Checked)
{
prodstatusPart.Visible = false;
nonProdStatusPart.Visible =
true;

}

}

}
designer.cs
this.splitContainer2.Panel2.Controls.Add(this.prodstatusPart);
this.splitContainer2.Panel2.Controls.Add(this.nonProdStatusPart);
this.splitContainer2.Size = new System.Drawing.Size(1128, 702);
this.splitContainer2.SplitterDistance = 82;
this.splitContainer2.TabIndex = 0;

This whole thing is appearing in bottom section of my GUI page.
My question is that,when i click radiobutton,some thing(Say user name ,class is Test.cs) should be visible in the top section of the GUI page(top section is independent).
If am using Test.visible  in
if
(radProdStatus.Checked)
{Test.visible  =true;
}
its not working since top section of GUI page is independent.Its not included in the panel of bottom section
 
How could I achieve the same?