L
liups
Hi,
I have an array of usercontrols, each of the usercontrol has a label
and a textbox, I want to do some checking when the textbox loses
focus, the code is like this:
Private Sub txtTextBox_Leave(ByVal sender As Object, ByVal e As
System.EventArgs) Handles txtTextBox.Leave
select case me.tabindex
case 3...
case 5...
but this event won't fire, while "txtTextBox_KeyPress" is working
without problem.
I figured out that I can use the usercontrol's own 'leave' event,
because the label's TabStop is set to false and the textbox's TabStop
is true, so leaving the textbox means leaving the usercontrol, but the
usercontrol is in a control array, the IDE says I cannot use
'withevents' on control array, but this is not a good solution anyway,
I'm trying to do the checking inside the usercontrol.
Thanks for any ideas.
I have an array of usercontrols, each of the usercontrol has a label
and a textbox, I want to do some checking when the textbox loses
focus, the code is like this:
Private Sub txtTextBox_Leave(ByVal sender As Object, ByVal e As
System.EventArgs) Handles txtTextBox.Leave
select case me.tabindex
case 3...
case 5...
but this event won't fire, while "txtTextBox_KeyPress" is working
without problem.
I figured out that I can use the usercontrol's own 'leave' event,
because the label's TabStop is set to false and the textbox's TabStop
is true, so leaving the textbox means leaving the usercontrol, but the
usercontrol is in a control array, the IDE says I cannot use
'withevents' on control array, but this is not a good solution anyway,
I'm trying to do the checking inside the usercontrol.
Thanks for any ideas.