G
Guest
I found in a windows form application, if you have a validating event attached to a textbox, that event is not reliable.
For example, in a MDI application, you created a toolbar in the MDI container. And one of the MDI child has a textbox with validating event.
Then you input some invalid text into the textbox, then click a button of the toolbar.
Sure, you will get validating event invoked and you have to come back to the textbox. Ok now, you press <TAB>, magic happens, you can leave this field, and there is no validating event being called again.
The pattern is, if your form is in MDI, and you trigger validating by moving focus to a control out of your form but in same MDI container. Then validating event will be missed when next time it is supposed to happen.
I believe this is a serious problem and security hole of .NET framework.
Is there anybody has experience to have workaround?
For example, in a MDI application, you created a toolbar in the MDI container. And one of the MDI child has a textbox with validating event.
Then you input some invalid text into the textbox, then click a button of the toolbar.
Sure, you will get validating event invoked and you have to come back to the textbox. Ok now, you press <TAB>, magic happens, you can leave this field, and there is no validating event being called again.
The pattern is, if your form is in MDI, and you trigger validating by moving focus to a control out of your form but in same MDI container. Then validating event will be missed when next time it is supposed to happen.
I believe this is a serious problem and security hole of .NET framework.
Is there anybody has experience to have workaround?