BUG: Disabled Listbox Items Enabled Using Arrow Keys

ID: Q156737


The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 5.0, 5.0a, 6.0
  • Pro Edition of Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b


SYMPTOMS

An item in a ListBox control can be disabled by placing a backslash (\) before the item. The item will be grayed out and cannot be selected by using the mouse.


WORKAROUND

You can select the disabled item using the keyboard arrow keys, and the Value and ControlSource properties of the list box will reflect the value of the selected disabled item.


STATUS

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


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new form.


  2. Add an array property to the form and name it aListItems1[9].


  3. In the Load event of the form, add the following code:
    
       DIMENSION ThisForm.aListItems1[9]
       ThisForm.aListItems1[1]="First"
       ThisForm.aListItems1[2]="Second"
       ThisForm.aListItems1[3]="\Third"
       ThisForm.aListItems1[4]="Fourth"
       ThisForm.aListItems1[5]="Fifth"
       ThisForm.aListItems1[6]="Sixth"
       ThisForm.aListItems1[7]="Seventh"
       ThisForm.aListItems1[8]="\Eighth"
       ThisForm.aListItems1[9]="Ninth" 


  4. Add a TextBox to the form.


  5. Add a ListBox to the form, and set the properties as follows:
    
       ControlSource = ThisForm.Text1.Value
       RowSourceType = 5 - Array
       RowSource = ThisForm.aListItems1 


  6. Save and run the form.


  7. Using the keyboard arrows to move up and down in the ListBox, try to select the disabled items. Note that the disabled item gets selected and the value is displayed in the TextBox.


Additional query words: kbvfp300 kbvfp300b kbvfp500 kbvfp500a kbvfp600

Keywords : kbVFp kbVFp300bbug kbVFp500abug buglist3.00 FxprgClassoop FxtoolFormdes
Version : WINDOWS:3.0,3.0b,5.0,5.0a,6.0
Platform : WINDOWS
Issue type : kbbug


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