1.单选按钮(RadioButton)

 

 

同一组中其他单选按钮不能同时选定

分组形式:panel GoupBox 窗体

 方法:

属性

说明

Appearance

RadioButton 控件的显示与命令按钮相似

Checked

确定是否已选定控件

方法

说明

Focus

将输入焦点移至控件

实现的界面

c# 窗体开发2 高级控件的使用

 1 private void button1_Click(object sender, EventArgs e)
 2         {
 3             if (radioButton1.Checked)
 4             {
 5                 MessageBox.Show("第一个");
 6             }
 7             else if (radioButton2.Checked)
 8             {
 9                 MessageBox.Show("第二个");
10             }
11             else if (radioButton3.Checked)
12             {
13                 MessageBox.Show("第三个");
14             }
15             else if (radioButton4.Checked)
16             {
17                 MessageBox.Show("第四 个");
18             }
19            
20         }
单选按钮

相关文章:

  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-04-12
  • 2022-12-23
猜你喜欢
  • 2021-12-03
  • 2021-07-30
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2021-04-10
相关资源
相似解决方案