Tabs stop working

ehelin

Freshman
Joined
Oct 11, 2005
Messages
48
Hi:

Has anyone encountered their application tabs stopping working? There is no one thing that does this...but I have noticed it most when I click on a text field and then when I try to tab to the next control, I can't.

Doesn't always happen...I'm not trapping any key events on the text fields in question.

Thoughts?

Eric
 
If a textbox is set to accept tabs as text input then it will not allow you to tab to the next control because the tab is processed as a character being typed into the box. You will probably also see this with RichTextBoxes and maybe other text-based controls.
 
Thanks for the thought, but that's not it. My textboxes are not set to accept tabs as text. However, I was able to find a work around (from another post on this forum) and I'm using the key preview property of my main form and overriding the key pressed event to pass tabs through.

Its a hack, but seems to get the job done. If you are interested:

Protected Overrides Sub OnKeyPress(ByVal e As KeyPressEventArgs)
If VarInitialLoadComplete Then
If e.KeyChar = Microsoft.VisualBasic.ChrW(9) Then
MyBase.ProcessTabKey(True)
End If
End If
End Sub

Thanks for the response!

Eric
 
Back
Top