`
wsql
  • 浏览: 11873212 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

寻找选择的RadioButton

 
阅读更多

bool select = false;
foreach (Control cl in flowLayoutPanel.Controls)
{
if (cl is RadioButton)
{
if (((RadioButton)cl).Checked)
{
MessageBox.Show("当前选择的是:" + cl.Name);
select = true;
break;
}
}
}
if (!select)
{
MessageBox.Show("请选择要删除的内容!", "系统提示:");
return;
}

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics