I am trying to set a button to the Enabled state when certain conditions are met, but it doesn’t seem to pay attention to when I set it to true. When I debug through the code, and put a watch on the Enabled variable, it changes to true, but when I mouseover the variable after it is set to true, it still says it is false. The button remains disabled when it needs to be enabled. Has anyone else ever run into this?
Here is the code I am having issues with:
if (!thisCondition){
this.btnOK.Enabled = true;
}
There’s really not much more to it… it seems silly I know.
I found the issue, there was a function that the debugger was stepping over that I failed to notice that was setting the value back arbitrarily. Gotta love unreadable code!