BUG: Changing TabIndex at Run Time Has No Effect

ID: Q215363


The information in this article applies to:
  • Microsoft Windows CE Toolkit for Visual Basic 6.0, version 1.0


SYMPTOMS

Changing the TabIndex property of a control at run time does not change the tab order. The behavior occurs in both the emulation and device modes of Palm-size PC, Handheld PC, and Handheld PC Pro projects. The expected behavior is the tab order changes according to the TabIndex property.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

This section shows how to create a sample project that demonstrates the bug behavior.

Steps to Reproduce Behavior

  1. Start a new Windows CE HPC project in Visual Basic. Form1 is created by default.


  2. Add five CommandButtons to Form1.


  3. Copy the following code to the Form1 code window:


  4. 
    Option Explicit
    Private Sub Command1_Click()
       Form1.Cls
       Print "Command1.TabIndex=" & Command1.TabIndex
       Print "Command2.TabIndex=" & Command2.TabIndex
       Print "Command3.TabIndex=" & Command3.TabIndex
       Print "Command4.TabIndex=" & Command4.TabIndex
       Print "Command5.TabIndex=" & Command5.TabIndex
    End Sub
    
    Private Sub Command2_Click()
       Command1.TabIndex = 2
       Command2.TabIndex = 1
       Command3.TabIndex = 4
       Command4.TabIndex = 0
       Command5.TabIndex = 3
       Form1.Cls
       Print "Command1.TabIndex=" & Command1.TabIndex
       Print "Command2.TabIndex=" & Command2.TabIndex
       Print "Command3.TabIndex=" & Command3.TabIndex
       Print "Command4.TabIndex=" & Command4.TabIndex
       Print "Command5.TabIndex=" & Command5.TabIndex
    End Sub 
  5. Start the project, targeting either emulation or the remote device. Click Command1 and note the TabIndex value for each command button. Click the TAB key to verify the tab order matches the TabIndex values.


  6. Click Command2 to change the TabIndex property. Check the tab order using the TAB key.


  7. Notice that the tab order does not change. The expected behavior is the tab order should change according to the new TabIndex property.

Additional query words: vbce vbce6

Keywords : kbToolkit kbVBp600bug kbWinCE kbGrpVB
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: September 29, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.