Hi all,
this is occurring on Version 2008.3:
I have a UserControl containing a TextBox in a Panel wich is docked together with other Panes in a TabGroup.
The TextBox has a Validating event where I display a MessageBox if the text is wrong. After entering a Text which is not validated and clicking on another tab, the MessageBox is shown and then the application hangs. I attach a simple demo project.
Does anybody have an idea how can I avoid this?
Thanks,
Anca
Hello Anca,
I tested your sample at 8.3 and the UltraTextEditor_Validating event fies 4 times whenever an invalid value is entered and you switch tabs. That event should fire just once. I tested the sample at 10.1, 10.2, and 10.3 and the event fires just once. The issue still exists at 2009 volume 2, but that volume just had its last service release so no more changes will be made to that version.
I would upgrade to 10.1 or later and that will solve the issue. Please let me know if you have any questions.
Sincerely,CharlieSenior Developer Support EngineerMCTS
Hello Charlie,
thanks for the quick reply, we cannot upgrade now, we're just before going productive.
Well, having the Validating event 4 times would be ok, here is just hanging after closing the Dialog.
I see it hits endless UserControl1_Leave. What can I put in here to break the loop? To cancel somehow switching the tabs.
Hello Anca.
I tested the sample that you provided us in this thread in the release build of 8.3 (build 1009) and the latest service release (build 2148). In both cases the events fire like this:
ultraTextEditor1_ValidatingultraTextEditor1_ValidatingUserControl1_LeaveultraTextEditor1_ValidatingUserControl1_LeaveultraTextEditor1_Validating
I don't see the infinite loop of events. It stops after the validating event is fired for the fourth time.
Sincerely,
CharlieSenior Developer Support EngineerMCTS
I'm glad that you were able to solve this issue with the installation of the service release. Please let me know if you have any other questions.
Charlie, you're right!
I have installed the latest service release and the infinite loop is gone.
Thanks for the help, I really appreciate!