如何创建与其他单选按钮相对应的单选按钮,这些单选按钮在可见的情况下随着选中和取消选中该单选按钮而变得可见和不可见 [英] how to create a radio button that corresponds with a other radio buttons which become visible and invisible as the radio button is checked and unchecked using visual studi

查看:77
本文介绍了如何创建与其他单选按钮相对应的单选按钮,这些单选按钮在可见的情况下随着选中和取消选中该单选按钮而变得可见和不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对不起,我是C#的新手.如何创建与其他单选按钮相对应的单选按钮,这些单选按钮随着单选按钮变得可见和不可见,已使用Visual Studio进行了选中和取消选中

Sorry i''m new to C#. How to create a radio button that corresponds with other radio buttons which become visible and invisible as the radio button is checked and unchecked using visual studio

推荐答案

尝试以下代码:

try this code:

private void radioButton1_CheckedChanged(Object sender,
                                         EventArgs e)
{
    if(radioButton1.checked ==true)
     {
      radionButton2.visiible = false;
      }
   else
    {
      radionButton2.visiible = true;
    }

}



希望对您有帮助.

随时提问

如果有帮助的话,别忘了投票:)



hope it helps..

feel free to ask question

don''t forget to vote if it helped you :)


这篇关于如何创建与其他单选按钮相对应的单选按钮,这些单选按钮在可见的情况下随着选中和取消选中该单选按钮而变得可见和不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆