checkbox+textbox 一个checkbox:cbA,另一个:cbB,和一个textbox:txtTest当选中cbA时:txtTest.Text+="cbA:"+"A";取消选择cbB时:去掉选中时的值cbB一样,取消选中去掉值怎么做哦,各位帮忙决绝下 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 private void cbA_CheckedChanged(object sender, EventArgs e) { if(cbA.Checked) { // } else { // } } private void cbA_CheckedChanged(object sender, EventArgs e) { if(cbA.Checked) { txtTest.Text+="cbA:"+"A"; } else { txtTest.Text+="cbA:"+"A";//??? txtTest.Text ="";//??? } } private void cbA_CheckedChanged(object sender, EventArgs e) { txtTest.Text+=cbA.Checked?"":""; }Replace替换 private void cbA_CheckedChanged(object sender, EventArgs e) { if(cbA.Checked) { txtTest.Text+="cbA:"+"A"; } else { txtTest.Text+="cbA:"+"A";//??? txtTest.Text ="";//??? } } 这样不行。一取消选中的话就给清空了,还有个cbB呢 这样不是和IF ELSE一个样么? winform怎么发布非微软的安装包? JAVA代码转C#,请高手帮忙看看 textbook输出结果的小数位如何取?(求助) 如何使用vs2005编译单个C#类 如何把字符串变量 转换成控件? 请问如何在页面嵌套iframe 多此一举的microsoft 初学正则,这个要怎么写呢,十万火急!!! 多线程结束的问题. [300分]大家帮帮忙,困扰我很久的问题了,关于动态生成控件的问题!!! C#读取项目内文本文件 调试dll的问题
private void cbA_CheckedChanged(object sender, EventArgs e)
{
if(cbA.Checked)
{
//
}
else
{
//
}
}
private void cbA_CheckedChanged(object sender, EventArgs e)
{
if(cbA.Checked)
{
txtTest.Text+="cbA:"+"A";
}
else
{
txtTest.Text+="cbA:"+"A";//???
txtTest.Text ="";//??? }
}
{
txtTest.Text+=cbA.Checked?"":"";
}
Replace替换
{
if(cbA.Checked)
{
txtTest.Text+="cbA:"+"A";
}
else
{
txtTest.Text+="cbA:"+"A";//???
txtTest.Text ="";//??? }
}