Infinite loop when Select?!

Posted by serhio on Stack Overflow See other posts from Stack Overflow or by serhio
Published on 2010-06-16T09:50:36Z Indexed on 2010/06/16 9:52 UTC
Read the original article Hit count: 152

Filed under:
|

I have a winform in witch I have a custom LongPanel with textboxes.
In order to validate an eventually edited textbox when the user click somewhere out of textBoxY I use the following code:

  Private Sub LongPanel_MouseClick(ByVal sender As Object, ByVal e As MouseEventArgs) _
Handles MyBase.MouseClick
      _AttachedPanel.Select()
  End Sub

In runtime application freezes at the "Select" line... I receive infinite panel Leave events... any idea why?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about winforms