Hello,
we derived the checkbox and i want to add a sub like SetCheckStateSilent for setting the CheckState without fireing any event. Therefor i want to override the OnCheckStateChanged but it is not overridable. Why?
Is it possible to set the value without fireing the CheckValueChanged nor Validated event? The Validated event fires but not through the OnValidated-method.
Thank you,
Bjoern
I understand what you wrote here, but I am unable to find any situation in which the Validated event fires outside of the OnValidated method.
Can you provide a sample in which this occurs?
Hello Mike,
then i try it again. An event is raised by the object when calling "RaiseEvent xyz". But this line you should not call in a normal method. You should call it in the overridable OnXyz method and in any case you want to call the event you have to call the OnXyz instead of RaiseEvent xyz. To manipulate the events in derived classes you can override the OnXyz to execute code before or after the events is raised.
But in the case of your checkbox the event apparently is fired by RaiseEvent in a method which is not the OnValidated method. So nobody can execute code before or after the event. After the event is only possible when you handle the event itself.
Regards,
Hi,
I'm sorry, but I do not understand what you are describing.
the Validated-Event is fired without calling the OnValidated-method before. Normally you call the OnValidated-method which calls base method and so on until the real base calls raise event. But when i override the OnValidated method the part will never be called. So something is not right in the derivation.
Hello Bjoern,
I create a private case for you with reference number CAS-100905-R0V0Z9. Please feel free to write us if you have any questions.
Regards