Experts,
Is it possible to set a checkbox checked value to true via a class residing outside of the form the checkbox resides in. Specifically, I would like to have my class search for certain parameters and set the checkbox on the main form to checkbox.checked = true. Currently, my class does not recognize the checkbox "…does not exist in the current content"). So, how do I get my class to "see" the checkbox, and then set it's value to checked? I would appreciate an example, if possible.
VulpesPosted Mar 24, 2012, 12:53 PM
Sam HobbsPosted Mar 24, 2012, 6:21 PM
Sam HobbsPosted Mar 24, 2012, 6:17 PM
You can create a method or property of the form. Properties is something that language experts consider to be good. It is often difficult to understand the value of properties and other object-oriented features but language experts have learned the value of adding a little abstraction can be very beneficial. Something like the following.
{}SenthilkumarPosted Mar 24, 2012, 12:56 PM
I think you do not have control on class which actually having the status of the control in another form.
But what you can do is, you can create the custom class with properties which actually maintains the status of the controls.
public class ControlStates
{
public bool checkbox1{get;set;}
}
The above class can maintain the state of the control.