c# - change checkbox by another checkbox inside the event -


in winforms application, have situation. 1 checkbox should disabled when checkbox checked. know isn't ideal design, quite lot depends on , wonder how make code below work, smallest change large code base.

private void cbcalibrate_checkedchanged(object sender, eventargs e) {     checkstate calibrationbussy;     calibrationbussy = cbdenoise.checkstate;     cbdenoise.checked = false;     cbdenoise.show();                      // cbdenoise checkbox doesnt change     cbdenoise.checkstate = calibrationbussy;     cbdenoise.show(); } 

update should use checked instead of checkstate still problem remains. (as checked enabled vs disabled), checkedstate has 3th option not determined (user didnt touch control).

        bool calibrationbussy;         calibrationbussy = cbdenoise.checked;         cbdenoise.checked =false;         cbdenoise.show();         cbdenoise.checked = calibrationbussy;         cbdenoise.show(); 

 public void cbcalibrate_checkedchanged(object sender, eventargs e)         {             checkstate calibrationbussy;             satusbeforecalibrating = cbdenoise.checkstate;             if ( cbdenoise.checked == true)             {                 account = "active";                 cbdenoise.show();                }             else if ( cbdenoise.checked  == false)             {                 account = "deactive";               cbdenoise.show();                }         } 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -