GroupBox Selected

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jez123456

    GroupBox Selected

    Hi

    I have a Windows GroupBox (m_groupBox) on a form which acts as a filter and
    contains 26 filter radiobuttons (m_radioButtonA through m_radioButtonZ) .

    How can I check in code which radiobutton has been selected? There does not
    seem to be a property in the groupBox for this.

    Thanks


  • AMALORPAVANATHAN YAGULASAMY(AMAL)MCP,MCS

    #2
    RE: GroupBox Selected

    Use the following code,

    for(int i=0;i<groupBox1 .Controls.Count ;i++)
    {
    if (((RadioButton) groupBox1.Contr ols[i]).Checked)
    MessageBox.Show (((RadioButton) groupBox1.Contr ols[i]).Text);
    }

    --
    Regards,
    Amal [MCP, MCS]
    Latest news coverage, email, free stock quotes, live scores and video are just the beginning. Discover more every day at Yahoo!



    "jez123456" wrote:
    [color=blue]
    > Hi
    >
    > I have a Windows GroupBox (m_groupBox) on a form which acts as a filter and
    > contains 26 filter radiobuttons (m_radioButtonA through m_radioButtonZ) .
    >
    > How can I check in code which radiobutton has been selected? There does not
    > seem to be a property in the groupBox for this.
    >
    > Thanks
    >
    >[/color]

    Comment

    Working...