RadioButton

zlopen 2003-08-22 10:45:02
四个RadioButton放到了一个GroupBox里,代码如下
private void ChangeFlatStyle(object sender, System.EventArgs e)
{
FlatStyle fs;
if (sender == rbFlat)
fs == FlatStyle.Flat ;
else (sender == rbPopup)
fs == FlatStyle.Popup ;
else (sender == rbSystem)
fs==FlatStyle.System ;
else
fs==FlatStyle.Standard;
btnDispDlg.FlatStyle = fs;
rbStandard.FlatStyle = fs;
rbFlat.FlatStyle = fs;
rbPopup.FlatStyle = fs;
rbSystem.FlatStyle = fs;
cbTest.FlatStyle = fs;
cbThreeState.FlatStyle = fs;
cbButton.FlatStyle = fs;
}
有错,无法编译,不知是哪里的问题
...全文
71 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
qhgary 2003-08-22
  • 打赏
  • 举报
回复
if (((RadioButton)sender).Name == rbFlat)
其它类同
雪狼1234567 2003-08-22
  • 打赏
  • 举报
回复
if((sender as RadioButton).Name = rbFlat)
其它类同

110,499

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧