Infinite loop when Selecting a panel?
- by serhio
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(sender is a panel)... any idea why?
EDIT:
precision on panels parents:
Form => SplitPanel => _AttachedPanel | _LongPanel
(_LongPanel contains a reference to _AttachedPanel)