modified is a built in "IsDirty". When the text box is instantiated, modified is set to false. As soon as a user changes the .text value of the text box, the value of modified is set to true.
This is how you can tell if a value has been changed befor closeing/saving/etc a form, just cycle through the controls collection looking for anything that has been modified.
To tell the truth Hayt, I didn't know what it was at the moment either. But I'm familier with the IsDirty practice and figured is was implimented some how in .Net. Hop into the IDE, add a text box and look at the properties in code. The intellisence and pop ups fill you in on the details.
I don't know of one if there is. You could create a custom class that would have it. Inherit the combo box and add a public property Modified. Then either impliment an event handler inside your custom class to change Modified to True when the value changes, or add that code to your application and just have it set the .Modified value from the app.
The later would be preferable, but I haven't found a way to handle an event inside of an inherited control and throw that event again for the form that the control is on. Maybe one of the Pros here has an idea.
The goal would be to handle the ComboBox1.TextChanged or selected change inside the custom class and then raise that same event for the form that the combo box is on. Hope that makes sence.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.