BUG: SSTab Focus Given to a Control on a Non-Visible Tab
Article ID: 193021
Article Last Modified on 3/3/2005
APPLIES TO
- Microsoft Visual Basic 5.0 Learning Edition
- Microsoft Visual Basic 6.0 Learning Edition
- Microsoft Visual Basic 5.0 Professional Edition
- Microsoft Visual Basic 6.0 Professional Edition
- Microsoft Visual Basic 5.0 Enterprise Edition
- Microsoft Visual Basic 6.0 Enterprise Edition
This article was previously published under Q193021
SYMPTOMS
Pressing an ARROW key when a control contained on a SSTab has the focus may
cause focus to be transferred to a control on a Tab that is not visible.
The behavior also occurs if the control on a Tab that is not visible has an
access key (ex. Command2.Caption = "&Command2"). The control's Click event
can be accessed by pressing the ALT+C key combination, even though the
control is on a tab that is not visible.
RESOLUTION
To work around this bug behavior, set the focus to the Tab with the control in the Lost Focus event of the last control in the Tab. If you created the sample project, add the following code to the Form1 code window:
Private Sub Command1_LostFocus()
SSTab1.Tab = 1
SSTab1.SetFocus
End Sub
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products
listed at the beginning of this article.
Keywords: kbbug kbnofix kbtabctrl kbctrl KB193021