V
VJ
I have a window were I display a bunch of Labels. A click event is attached
for each label, when clicked it will display a edit box i.e textbox. If the
enter key is pressed in the textbox I want to the foucs to shift to the next
label in taborder and then fire the click event of that label and display a
editbox. Here is what I tried..and its not working..
The current edit box has a key down event.. with code like this..
If e.KeyCode = Keys.Enter Then
e.Handled = False
SendKeys.Send("{TAB}")
End If
when each label is created.. i have events attached like this...
AddHandler lbl.Click, AddressOf lbl_ShowTb
lbl.TabStop = True
AddHandler lbl.Enter, AddressOf lbl_Enter
and in the lbl_Enter event I have code like this...
lbl_ShowTb(sender, e)
The showTb has code for removing any pending editboxes.. which works for
other conditions.. which is not a problem.
What am I doing worng..? The sendkeys.send is not moving the foucs...?
Thanks
VJ
for each label, when clicked it will display a edit box i.e textbox. If the
enter key is pressed in the textbox I want to the foucs to shift to the next
label in taborder and then fire the click event of that label and display a
editbox. Here is what I tried..and its not working..
The current edit box has a key down event.. with code like this..
If e.KeyCode = Keys.Enter Then
e.Handled = False
SendKeys.Send("{TAB}")
End If
when each label is created.. i have events attached like this...
AddHandler lbl.Click, AddressOf lbl_ShowTb
lbl.TabStop = True
AddHandler lbl.Enter, AddressOf lbl_Enter
and in the lbl_Enter event I have code like this...
lbl_ShowTb(sender, e)
The showTb has code for removing any pending editboxes.. which works for
other conditions.. which is not a problem.
What am I doing worng..? The sendkeys.send is not moving the foucs...?
Thanks
VJ